-
Notifications
You must be signed in to change notification settings - Fork 26
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
#1: PHP Warning: array_intersect_key(): #12
Comments
Can you please attach your mask.json file and tell which version of mask you are using. Thank you! |
Of course ... :-) json: i use the last version of mask from TER 2.1.1. Thanks! |
Would you mind to checkout the branch https://github.com/CPS-IT/TYPO3-mask_export/tree/restore-file-generation and re-try |
This fixes the problem! Now I can export the extension. Only one minor problem remains: after installing the exported extension all content elements in the common tab are gone and only the new CE is present. It seems more or less a problem of the bootstrap package ... Benny rewrote the whole wizard and added all content elements in the end with show = * ... i presume this syntax is not campatible with your "show := addToList(myNewElement)". When i delete the line show := addToList(myNewElement) all works as expected. Thanks! |
Hi Peter, Can you check the order of the extensions in your PackageStates.php? Maybe the bootstrap_package overrides the wizard items. In my example installtion bootstrap_package is loaded before the mask export. |
Reopened to get feedback |
Hi Nicole, in my installation too:
If i force the the order the other way round (fürst mask_example) and then bootstrap_package it works. the bootstrap package includes its content elements with: show = *
will work. There is a kind of logic behind it ... the method addToList cannot add himself to * ... This code in class TypoScriptParser: `
ends in $newValue = '*,name' |
Well, i found this piece of code in class NewContentElementController:
This line ist responsible: |
But this code is taken from mask extension, isn't it? This has nothing to do with the export then. |
Are you using mask and your export extension in the same installation? |
No, these are core classes - in the end it is a problem of the core, the typoscript renderer. if you put together |
This is really strange as in my setup with bootstrap_package everythink works fine. Can you just give me the version of bootstrap_package and your TYPO3 version again? Is there any other extension dealing with the new content element wizard? |
TYPO3 7.6.9 |
With a fresh installation and your extension information, I'm able to reproduce the problem now. Will have a look what happens here. |
Problem should be solved by the core with bugfix https://forge.typo3.org/issues/77877 Please consider to test and vote this patch. |
I tested the patch in TYPO3 7.6.9 in my test installation. It works as expected: independent from the installation order of mask_example and bootstrap_package all CEs are preserved. I looked in the code itself too and it looks straight forward for me. Well, it seems to be a pretty easy patch. So I voted for it. |
Thanks for testing and voting. I'm closing this issue now as the mask_export issue is solved. |
I installed mask in TYPO3 7.6.9 (clean introduction package), made 1 CE with mask. Then i installed mask_export (last version from GIT). When i click on Code Export - mask_example - Save then nothing happens. When i click on download i get a corrupt zip-archive with 0 bytes in it. After activating developer mode i got this Error:
#1: PHP Warning: array_intersect_key(): Argument #2 is not an array in /Volumes/DATEN/sites/typo3_76/typo3conf/ext/mask_export/Classes/Aggregate/AbstractOverridesAggregate.php line 49 (More information)
TYPO3\CMS\Core\Error\Exception thrown in file
/Volumes/DATEN/src/typo3_src-7.6.last/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 111.
24 TYPO3\CMS\Core\Error\ErrorHandler::handleError(2, "array_intersect_key(): Argument #2 is not an array", "/Volumes/DATEN/sites/typo3_76/typo3conf/ext/mask_e…t/Classes/Aggregate/AbstractOverridesAggregate.php", 49, array)
23 array_intersect_key(array, NULL)
/Volumes/DATEN/sites/typo3_76/typo3conf/ext/mask_export/Classes/Aggregate/AbstractOverridesAggregate.php:
00047: {
00048: $newTableFields = array_intersect_key($tableConfiguration['columns'],
00049: $this->maskConfiguration[$this->table]['tca']);
00050:
00051: if (empty($newTableFields)) {
22 CPSIT\MaskExport\Aggregate\AbstractOverridesAggregate::addTableColumns(array)
/Volumes/DATEN/sites/typo3_76/typo3conf/ext/mask_export/Classes/Aggregate/TtContentOverridesAggregate.php:
00049:
00050: $tableConfiguration = $GLOBALS['TCA'][$this->table];
00051: $this->addTableColumns($tableConfiguration);
00052: $this->addTableTypes($tableConfiguration);
00053: }
21 CPSIT\MaskExport\Aggregate\TtContentOverridesAggregate::process()
/Volumes/DATEN/sites/typo3_76/typo3conf/ext/mask_export/Classes/Aggregate/AbstractAggregate.php:
00052: {
00053: $this->maskConfiguration = $maskConfiguration;
00054: $this->process();
00055: }
00056:
20 CPSIT\MaskExport\Aggregate\AbstractAggregate::__construct(array)
/Volumes/DATEN/src/typo3_src-7.6.last/typo3/sysext/core/Classes/Utility/GeneralUtility.php:
04534: break;
04535: case 2:
04536: $instance = new $className($arguments[1]);
04537: break;
04538: case 3:
The text was updated successfully, but these errors were encountered: