Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule MigrateItemsIndexedKeysToAssociativeFractor is not working if keys are not 0/1 #248

Closed
wtfred opened this issue Nov 25, 2024 · 1 comment

Comments

@wtfred
Copy link

wtfred commented Nov 25, 2024

If you take this flexform from EXT:news https://github.com/georgringer/news/blob/main/Configuration/FlexForms/flexform_news_list.xml

you expect block like this

<config>
	<type>select</type>
	<itemsProcFunc>GeorgRinger\News\Hooks\ItemsProcFunc->user_orderBy</itemsProcFunc>
	<renderType>selectSingle</renderType>
	<items>
		<numIndex index="0" type="array">
			<numIndex index="label"></numIndex>
			<numIndex index="value"></numIndex>
		</numIndex>
		<numIndex index="1">
			<numIndex index="label">LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.tstamp</numIndex>
			<numIndex index="value">tstamp</numIndex>
		</numIndex>
		<numIndex index="2">
			<numIndex index="label">LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.datetime</numIndex>
			<numIndex index="value">datetime</numIndex>
		</numIndex>
		<numIndex index="3">
			<numIndex index="label">LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.crdate</numIndex>
			<numIndex index="value">crdate</numIndex>
		</numIndex>
		<numIndex index="4">
			<numIndex index="label">LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.title</numIndex>
			<numIndex index="value">title</numIndex>
		</numIndex>
	</items>
</config>

to be migrated like using MigrateItemsIndexedKeysToAssociativeFractor rule, but as keys are <numIndex index="label"> and <numIndex index="value">, they are not migrated to <label> and <value> tags

If you take the full flexform from news, you will also bump into this #246

@simonschaufi
Copy link
Collaborator

I'll close this one as the xml is invalid and not migrated correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants