OXIDprojects / oxid_modules_config

OXID Module Configuration Im-/Exporter module by OXID Professional Services
GNU General Public License v3.0
3 stars 9 forks source link

PSGEN-282-Config_export_import_module_full_port_to_v6 #3

Closed mantas-kemesius closed 6 years ago

smxsm commented 6 years ago

Hello, we'd like to continue using this module for Oxid v6, is anybody reviewing this? Would be great if it could be merged - thanks! 👍

keywan-ghadami-oxid commented 6 years ago

Hi @smxsm, There will be a huge update for the 5.x soon, then I will check this branch and maybe backport stuff. I don't think it will be possible to simply merge it because there are still 5.x projects using this module. So for some time there will be 2 branches. But of cause plan is to document them. Any help in using and testing this branch is welcome.

smxsm commented 6 years ago

I've just tried the branch of this PR in OXID EE 6.0.2 - the yaml export worked, but the import doesn't. The first error I got was

[OxidEsales\Eshop\Core\Exception\SystemComponentException] Function 'load' does not exist or is not accessible! (Oxps\ModulesConfig\Core\ModuleStateFixer)

That is caused because a ModuleStateFixer instance is used to load "Module" objects, I've tried to fix it using two different objects for it... that worked, and after fixing some other problems (e.g. I had to comment the line

<?php
        //$this->_addModuleSettings($oModule->getInfo("settings"), $sModuleId);

in ModuleStateFixer) the import of shop id 1 worked, but then for shop 2 it just exited, which is no wonder because of this exit() here:

<?php
    protected function saveThemeDisplayVars($sVarName, $mVarValue, $sModule)
    {
        exit();
        $oDb = DatabaseProvider::getDb();

So I don't know, this PR doesn't seem to be a "full port" yet as the name suggests ... not sure what to do now, is this anywhere near finished so that I could try to fix the remaining problems?

UPDATE: if I remove that exit() and make small changes to saveThemeDisplayVars() the import seems to work, too ... shop is running after the import, so basically it seems to work. I'll fork this branch and make a PR for the PR in case anyone else wants to try this with OXID 6 :)

smxsm commented 6 years ago

Here is my PR to get the import at least running until the end ... https://github.com/OXIDprojects/oxid_modules_config/pull/4