[Solved] Merconis & EFG ext.

Fragen und Antworten zur Einrichtung mit mehreren Sprachen

[Solved] Merconis & EFG ext.

Beitragvon vmulot » 25. Feb 2015, 16:17

Hi there,
it's me... again :)

I'm facing a new pb.
i'm using Merconis of course, and the EFG extension for creating new forms.
when choosing to register forms data in database, EFG is creating some DCA files.

then, when i'm going to : Extension manager
then : Update database

i got some warnings:

Code: Alles auswählen
Warning: Invalid argument supplied for foreach() in system/modules/zzz_merconis/ls_shop_controller.php on line 2233
#0 system/modules/zzz_merconis/ls_shop_controller.php(2233): __error(2, 'Invalid argumen...', '/home/xxxx/xxxx...', 2233, Array)
#1 system/modules/core/library/Contao/DcaLoader.php(97): ls_shop_controller->createMultiLanguageDCAFields('fd_feedback')
#2 system/modules/core/library/Contao/Controller.php(2373): Contao\DcaLoader->load(false)
#3 system/modules/core/library/Contao/DcaExtractor.php(345): Contao\Controller::loadDataContainer('fd_feedback')
#4 system/modules/core/library/Contao/DcaExtractor.php(122): Contao\DcaExtractor->createExtract()
#5 system/modules/core/library/Contao/DcaExtractor.php(138): Contao\DcaExtractor->__construct('fd_feedback')
#6 system/modules/core/library/Contao/Database/Installer.php(295): Contao\DcaExtractor::getInstance('fd_feedback')
#7 system/modules/core/library/Contao/Database/Installer.php(111): Contao\Database\Installer->getFromDca()
#8 system/modules/core/library/Contao/Database/Installer.php(41): Contao\Database\Installer->compileCommands()
#9 system/modules/repository/classes/RepositoryManager.php(485): Contao\Database\Installer->generateSqlForm()
#10 system/modules/repository/classes/RepositoryBackendModule.php(153): RepositoryManager->update('database')
#11 system/modules/core/classes/BackendModule.php(91): RepositoryBackendModule->compile()
#12 system/modules/repository/classes/RepositoryBackendModule.php(72): Contao\BackendModule->generate()
#13 system/modules/repository/classes/RepositoryManager.php(57): RepositoryBackendModule->generate()
#14 system/modules/core/classes/Backend.php(406): RepositoryManager->generate()
#15 system/modules/core/controllers/BackendMain.php(126): Contao\Backend->getBackendModule('repository_mana...')
#16 contao/main.php(20): Contao\BackendMain->run()
#17 {main}

Warning: Invalid argument supplied for foreach() in system/modules/zzz_merconis/ls_shop_controller.php on line 2233
#0 system/modules/zzz_merconis/ls_shop_controller.php(2233): __error(2, 'Invalid argumen...', '/home/xxxx/xxxx...', 2233, Array)
#1 system/modules/core/library/Contao/DcaLoader.php(97): ls_shop_controller->createMultiLanguageDCAFields('fd_neut-formula...')
#2 system/modules/core/library/Contao/Controller.php(2373): Contao\DcaLoader->load(false)
#3 system/modules/core/library/Contao/DcaExtractor.php(345): Contao\Controller::loadDataContainer('fd_neut-formula...')
#4 system/modules/core/library/Contao/DcaExtractor.php(122): Contao\DcaExtractor->createExtract()
#5 system/modules/core/library/Contao/DcaExtractor.php(138): Contao\DcaExtractor->__construct('fd_neut-formula...')
#6 system/modules/core/library/Contao/Database/Installer.php(295): Contao\DcaExtractor::getInstance('fd_neut-formula...')
#7 system/modules/core/library/Contao/Database/Installer.php(111): Contao\Database\Installer->getFromDca()
#8 system/modules/core/library/Contao/Database/Installer.php(41): Contao\Database\Installer->compileCommands()
#9 system/modules/repository/classes/RepositoryManager.php(485): Contao\Database\Installer->generateSqlForm()
#10 system/modules/repository/classes/RepositoryBackendModule.php(153): RepositoryManager->update('database')
#11 system/modules/core/classes/BackendModule.php(91): RepositoryBackendModule->compile()
#12 system/modules/repository/classes/RepositoryBackendModule.php(72): Contao\BackendModule->generate()
#13 system/modules/repository/classes/RepositoryManager.php(57): RepositoryBackendModule->generate()
#14 system/modules/core/classes/Backend.php(406): RepositoryManager->generate()
#15 system/modules/core/controllers/BackendMain.php(126): Contao\Backend->getBackendModule('repository_mana...')
#16 contao/main.php(20): Contao\BackendMain->run()
#17 {main}

Warning: Invalid argument supplied for foreach() in system/modules/zzz_merconis/ls_shop_controller.php on line 2233
#0 system/modules/zzz_merconis/ls_shop_controller.php(2233): __error(2, 'Invalid argumen...', '/home/xxxxx/xxxx...', 2233, Array)
#1 system/modules/core/library/Contao/DcaLoader.php(97): ls_shop_controller->createMultiLanguageDCAFields('fd_neut-formula...')
#2 system/modules/core/library/Contao/Controller.php(2373): Contao\DcaLoader->load(false)
#3 system/modules/core/library/Contao/DcaExtractor.php(345): Contao\Controller::loadDataContainer('fd_neut-formula...')
#4 system/modules/core/library/Contao/DcaExtractor.php(122): Contao\DcaExtractor->createExtract()
#5 system/modules/core/library/Contao/DcaExtractor.php(138): Contao\DcaExtractor->__construct('fd_neut-formula...')
#6 system/modules/core/library/Contao/Database/Installer.php(295): Contao\DcaExtractor::getInstance('fd_neut-formula...')
#7 system/modules/core/library/Contao/Database/Installer.php(111): Contao\Database\Installer->getFromDca()
#8 system/modules/core/library/Contao/Database/Installer.php(41): Contao\Database\Installer->compileCommands()
#9 system/modules/repository/classes/RepositoryManager.php(485): Contao\Database\Installer->generateSqlForm()
#10 system/modules/repository/classes/RepositoryBackendModule.php(153): RepositoryManager->update('database')
#11 system/modules/core/classes/BackendModule.php(91): RepositoryBackendModule->compile()
#12 system/modules/repository/classes/RepositoryBackendModule.php(72): Contao\BackendModule->generate()
#13 system/modules/repository/classes/RepositoryManager.php(57): RepositoryBackendModule->generate()
#14 system/modules/core/classes/Backend.php(406): RepositoryManager->generate()
#15 system/modules/core/controllers/BackendMain.php(126): Contao\Backend->getBackendModule('repository_mana...')
#16 contao/main.php(20): Contao\BackendMain->run()
#17 {main}


it seems that i have one warning for each dca file created by EFG.

any idea why ?

thanks
regards
Zuletzt geändert von vmulot am 3. Mär 2015, 17:09, insgesamt 1-mal geändert.
vmulot
 
Beiträge: 46
Registriert: 5. Nov 2014, 15:26

Re: Merconis & EFG ext.

Beitragvon supportteam » 26. Feb 2015, 07:14

Hi,

Merconis comes with special multilanguage backend widgets. When Merconis is processing them, it has to walk through the DCA files, look for those fields and dynamically add the corresponding database fields for all required languages. It seems like Merconis has a problem with the DCA files created by the EFG extension. Could you please send us the DCA files that were created by EFG so that we can have a look?

Reading your description of the problem, I'm not sure if the warnings only appear when you update the database or if they also appear when you use the frontend or perform regular backend actions like adding new products and so on. Do the warnings result in real trouble or is the system still running properly?
Ihr MERCONIS-Supportteam
Your MERCONIS Support Team
Benutzeravatar
supportteam
 
Beiträge: 245
Registriert: 28. Aug 2013, 16:58

Re: Merconis & EFG ext.

Beitragvon supportteam » 26. Feb 2015, 07:29

By the way: Did you refactor the code of ls_shop_controller.php? We're pretty sure that we know where the warning message wants to lead us but the line 2233 that is mentioned in your warning message does not seem to be right.

If you refactored any of the merconis files, please make sure to use the original files when your shop goes live. At some points, Merconis definitely expects its core files not to be changed.

If you want to add custom functionality to Merconis, you can use the merconis hooks described in its manual (http://www.merconis.com/tl_files/EigeneDateien/DokumenteUndSonstigeDateien/manual/Spezielle_Funktionen/Hooks.htm). Please, never add functionality by modifying Merconis core files.
Ihr MERCONIS-Supportteam
Your MERCONIS Support Team
Benutzeravatar
supportteam
 
Beiträge: 245
Registriert: 28. Aug 2013, 16:58

Re: Merconis & EFG ext.

Beitragvon vmulot » 26. Feb 2015, 21:09

hm I didn't change anything in core files and i don't think the one who started to work on it did.
Line 2233 is :
Code: Alles auswählen
        foreach ($GLOBALS['TL_DCA'][$strDCAName]['fields'] as $fieldKey => $arrFieldDefinition) {


you'll find a zip file for one of the dca file created.

i added a new product, and no warnings, i saw the warning only in the database update page.

thanks :)
Dateianhänge
fd_feedback.php.zip
one of the dca file generated
(15.18 KiB) 1603-mal heruntergeladen
vmulot
 
Beiträge: 46
Registriert: 5. Nov 2014, 15:26

Re: Merconis & EFG ext.

Beitragvon supportteam » 27. Feb 2015, 08:00

Thank you for providing the DCA file.

Merconis looks for multilanguage fields even in DCA definitions that don't come from the Merconis core because if someone writes his own extension for a Contao+Merconis installation he might want to use the merconis-style multilanguage fields in his extension too and Merconis supports that. This is the reason why Merconis even deals with the DCA created by EFG. Just in case you were wondering...

Anyway, the DCA file that you provided should not cause the warning because it definitely has the "fields" array which the warning claims not to be an array. Maybe one of the other DCA files created by EFG doesn't have the "fields" array or maybe there is some other reason why Merconis can't get proper access to the DCA arrays of the EFG-DCA.

Since it obviously is a little tricky figuring out what exactly causes the warning, I would suggest the following: If your system behaves as expected (Merconis and EFG work without any noticeable problems) and no more warnings appear in the regular work, we don't investigate any further because there's nothing to achieve. But as soon as you have a reason to believe that something might not work the way it should, you get back to us and we figure out what's wrong. Okay?
Ihr MERCONIS-Supportteam
Your MERCONIS Support Team
Benutzeravatar
supportteam
 
Beiträge: 245
Registriert: 28. Aug 2013, 16:58

Re: Merconis & EFG ext.

Beitragvon vmulot » 27. Feb 2015, 09:59

Ok deal ;)

i'll try to investigate more when i'll have time.
vmulot
 
Beiträge: 46
Registriert: 5. Nov 2014, 15:26

Re: Merconis & EFG ext.

Beitragvon vmulot » 2. Mär 2015, 14:55

I have the pb when i edit a group user, still investigating :)
vmulot
 
Beiträge: 46
Registriert: 5. Nov 2014, 15:26

Re: Merconis & EFG ext.

Beitragvon vmulot » 3. Mär 2015, 17:09

Problem solved, i did the Merconis Update and all is fine now :)
vmulot
 
Beiträge: 46
Registriert: 5. Nov 2014, 15:26


Zurück zu Shop mit mehreren Sprachen / Multi language support

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste