Code Monkey home page Code Monkey logo

oxid-module-internals's Introduction

Warning

There is no active maintainance anymore.

Since OXID 6.2 it's recommend to use https://github.com/vanilla-thunder/oxid-module-devutils instead of module internals.

Oxid Module Internals

Internal OXID eShop 6 module system information and troubleshooting tools.

proudly presented by OXID Hackathon 2017 ;-)

Original module (for Oxid eShop 5.x/4.x) by Alfonsas Cirtautas.

Features

Codacy Badge Next Release Test Status

  • Display highlighted metadata file content.
  • Reset module related shop cache data.
  • Toggle module activation / deactivation
  • Compare and troubleshoot metadata vs internally stores data
    • Extended classes
    • Template blocks
    • Settings
    • Registered files
    • Registered templates
    • Version
    • Events
  • Console command to fix modules

Installation

composer require oxid-community/moduleinternals

Screenshot

OXID_moduleinternals

Compatibillity Map

oxid eshop module internals
6.0 ^2.0
6.1 ^2.0 || 3.0
6.2 Not yet supported !

Next Release Test Status|

Changelog

  • 2021-05-14 3.1.0 remove frontend translation files
  • 2020-06-16 3.0.0 better error output, using shopswitcher lib, improve compatibility for oxid console
  • 2020-01-09 3.0.0-alpha3 compatible with oe console and oxrun
  • 2019-12-19 3.0.0-alpha better compatibility with oxid 6.2
  • 2019-01-21 2.0.0 Option to disable blocks,autodiscover module version number from composer,automatic module state fix (when opening admin module list) with feedback, overview page with accordion, admin homepage warnings, improved logging, improved fixing, remove state from disabled modules, support for different console versions
  • 2018-12-12 1.5.2 avoid php warning if module namespace can not be found
  • 2018-11-23 1.5.1 avoid error when fixing deactive module that has controllers
  • 2018-11-23 1.5.0 do not scan deactivated modules
  • 2018-11-23 1.4.3 fix error (modullist not shown, if oxid console is not installed)
  • 2018-11-23 1.4.2 ** WARNING KNOWN BUG see 1.4.3 ** fix compatibility with console applications by supporting new command registration via services.yml
  • 2018-11-23 1.4.1 add compatibility code for oxrun
  • 2018-11-22 1.4.0 improve performance, added module:fix console command, fixed module controller check
  • 2018-11-21 1.3.0 Show blocks, case sensitive file exist checks, support legacy class names, warn when extending edition namespace, highlight modules with issues.
  • 2018-11-21 1.2.2 fix fixing extensions
  • 2018-11-14 1.2.1 migration support from 1.0.1
  • 2018-11-14 1.2.0 support metadata v2.1
  • 2018-09-13 1.1.0 add external module healthy status page
  • 2017-12-15 1.0.1 namespace, docblocks
  • 2017-12-09 1.0.0 module release

Related Projects

Oxid Console

oxid-module-internals's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oxid-module-internals's Issues

template block info missing

As programmer(user of this module) I want to see the name of templateblock that has errors in the module status tab (like in the kiwi editon of this module )

feature: cronjob for Issue check

Currently, issues are only visible when only one 'part' from module is open / in use.
An additional periodical check whoul be nice.
This check should work without any action inside the BE.
An Email with the results (only negative results, or positive too - as an option) should send to the shopowner or an other person.

PHP Warning: count():

PHP Warning: count():

[23-Aug-2019 09:54:42 Europe/Berlin] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /xxx/yyy/zzz/vendor/oxid-community/moduleinternals/Core/InternalModule.php on line 231

Call for Collaborators

I am searching for additional maintainers that will watch the repository:
johannes, alfred (thank you for support)
more volunteers are welcome

Global Warnings or Errors in Admin

If a Module needs state fixes this should be displayed in overview page.
currently each module needs to be checked/fixed for problems.

What I expect:
On a module overview page or the admin start page, a message should be displayed if there is any issue.

Not compatible to OXID eShop 6.2

The module extends e.g.
OxidEsales\EshopCommunity\Core\Module\ModuleInstaller. In this class, the PhpDoc states: "@internal Do not make a module extension for this class." With OXID eShop v6.2.0-beta.1 (including https://github.com/OXID-eSales/oxideshop_ce/tree/v6.4.0), e.g. the method OxidEsales\EshopCommunity\Core\Module\ModuleInstaller::validateMetadataExtendSection() was removed. Therefore, the module does not work anymore. Maybe there are also other issues.

As the whole module installation and activation changed with OXID eShop v6.2.0-beta.1, the strategy how to proceed with this module must be reviewed.

PHP 7.0 requirement not set in composer.json

The module "oxid-module-internals" is compatible with OXID 6.0 (which have as requirement PHP 5.6) but in the code are using features from PHP7.0

for example in version 1.5.2:
oxideshop/vendor/oxid-community/moduleinternals/Core/FixHelper.php $iPosition = $aValue['position'] ?? 1;
and other two places

in version 2.0.0 is also at least one place.

The code should be changed to be compatible to PHP5.6 or the requirement of PHP7.0 should be set in modules composer.json

After installation on OXID 6.2.0 EE "module" section in admin panel crashes

OXID 6.2.0 throw an error in log file:
[2020-04-10 10:22:46] OXID Logger.ERROR: Function 'validateMetadataExtendSection' does not exist or is not accessible! (OxidCommunity\ModuleInternals\Core\ModuleStateFixer) ["[object] (OxidEsales\\Eshop\\Core\\Exception\\SystemComponentException(code: 0): Function 'validateMetadataExtendSection' does not exist or is not accessible! (OxidCommunity\\ModuleInternals\\Core\\ModuleStateFixer)\n at /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Core/Base.php:84)\n[stacktrace]\n#0 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(679): OxidEsales\\EshopCommunity\\Core\\Base->__call('validateMetadat...', Array)\n#1 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(540): OxidCommunity\\ModuleInternals\\Core\\ModuleStateFixer->checkExtensions(Object(OxidCommunity\\ModuleInternals\\Core\\InternalModule), Array, Array)\n#2 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(693): OxidCommunity\\ModuleInternals\\Core\\ModuleStateFixer->_addExtensions(Object(OxidCommunity\\ModuleInternals\\Core\\InternalModule))\n#3 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(360): OxidCommunity\\ModuleInternals\\Core\\ModuleStateFixer->fixExtensions(Object(OxidCommunity\\ModuleInternals\\Core\\InternalModule))\n#4 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(107): OxidCommunity\\ModuleInternals\\Core\\ModuleStateFixer->restoreModuleInformation(Object(OxidCommunity\\ModuleInternals\\Core\\InternalModule), 'bestitamazonpay...')\n#5 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-community/moduleinternals/Core/InternalModule.php(250): OxidCommunity\\ModuleInternals\\Core\\ModuleStateFixer->fix(Object(OxidCommunity\\ModuleInternals\\Core\\InternalModule))\n#6 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/Admin/ModuleList.php(72): OxidCommunity\\ModuleInternals\\Core\\InternalModule->getTitle()\n#7 [internal function]: OxidEsales\\EshopCommunity\\Application\\Controller\\Admin\\ModuleList->OxidEsales\\EshopCommunity\\Application\\Controller\\Admin\\{closure}(Object(OxidCommunity\\ModuleInternals\\Core\\InternalModule), Object(OxidCommunity\\ModuleInternals\\Core\\InternalModule))\n#8 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/Admin/ModuleList.php(73): usort(Array, Object(Closure))\n#9 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/Admin/ModuleList.php(59): OxidEsales\\EshopCommunity\\Application\\Controller\\Admin\\ModuleList->sortModulesByTitleAlphabetically(Array)\n#10 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/Admin/ModuleList.php(38): OxidEsales\\EshopCommunity\\Application\\Controller\\Admin\\ModuleList->getInstalledModules()\n#11 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(465): OxidEsales\\EshopCommunity\\Application\\Controller\\Admin\\ModuleList->render()\n#12 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ee/Core/ShopControl.php(208): OxidEsales\\EshopCommunity\\Core\\ShopControl->_render(Object(OxidEsales\\Eshop\\Application\\Controller\\Admin\\ModuleList))\n#13 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(357): OxidEsales\\EshopEnterprise\\Core\\ShopControl->_render(Object(OxidEsales\\Eshop\\Application\\Controller\\Admin\\ModuleList))\n#14 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ee/Core/ShopControl.php(98): OxidEsales\\EshopCommunity\\Core\\ShopControl->formOutput(Object(OxidEsales\\Eshop\\Application\\Controller\\Admin\\ModuleList))\n#15 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(281): OxidEsales\\EshopEnterprise\\Core\\ShopControl->formOutput(Object(OxidEsales\\Eshop\\Application\\Controller\\Admin\\ModuleList))\n#16 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(142): OxidEsales\\EshopCommunity\\Core\\ShopControl->_process('OxidEsales\\\\Esho...', NULL, NULL, NULL)\n#17 /var/www/html/oxidproject/releases/releaseinit/vendor/oxid-esales/oxideshop-ce/source/Core/Oxid.php(27): OxidEsales\\EshopCommunity\\Core\\ShopControl->start()\n#18 /var/www/html/oxidproject/releases/releaseinit/source/index.php(16): OxidEsales\\EshopCommunity\\Core\\Oxid::run()\n#19 /var/www/html/oxidproject/releases/releaseinit/source/admin/index.php(12): require_once('/var/www/html/r...')\n#20 {main}\n"] []

More Tests needed

Idea is to make some tests for the issues that occured in the past

Fixing things should be logged

with 2.0.0 alpha automatic fixing was introduced.
that actions should be logged to understand, track why and when problems are disapearing.

False alarm on legacy class extends

Module internals shows warnings and errors on modules that using legacy class names e.g. oxarticle or oxorder in the metadata extends section

feature: accordion on the overview page

the overview page lists all modules with all the details resulting in long list.
It would be useful to have only the title of the module unless you open it or unless it some issues and is automatically opened.

Function 'getAutoloader' does not exist or is not accessible!

Logmessage:

[2019-01-17 10:38:59] OXID Logger.ERROR: Function 'getAutoloader' does not exist or is not accessible! (OxidCommunity\ModuleInternals\Core\InternalModule)
["[object] (OxidEsales\Eshop\Core\Exception\SystemComponentException(code: 0): Function 'getAutoloader' does not exist or is not accessible! (OxidCommunity\ModuleInternals\Core\InternalModule)\n at /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/Base.php:76)\n[stacktrace]\n#0 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-community/moduleinternals/Core/ModuleHelper.php(52): OxidEsales\EshopCommunity\Core\Base->__call('getAutoloader', Array)\n#1 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-community/moduleinternals/Core/ModuleExtensionCleanerDebug.php(124): OxidCommunity\ModuleInternals\Core\ModuleHelper->getModuleNameSpace()\n#2 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-community/moduleinternals/Core/ModuleExtensionCleanerDebug.php(46): OxidCommunity\ModuleInternals\Core\ModuleExtensionCleanerDebug->filterExtensionsByModule(Array, Object(OxidCommunity\ModuleInternals\Core\InternalModule))\n#3 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/Module/ModuleInstaller.php(594): OxidCommunity\ModuleInternals\Core\ModuleExtensionCleanerDebug->cleanExtensions(Array, Object(OxidCommunity\ModuleInternals\Core\InternalModule))\n#4 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(561): OxidEsales\EshopCommunity\Core\Module\ModuleInstaller->_removeNotUsedExtensions(Array, Object(OxidCommunity\ModuleInternals\Core\InternalModule))\n#5 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(451): OxidCommunity\ModuleInternals\Core\ModuleStateFixer->checkExtensions(Object(OxidCommunity\ModuleInternals\Core\InternalModule), Array, Array)\n#6 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(579): OxidCommunity\ModuleInternals\Core\ModuleStateFixer->_addExtensions(Object(OxidCommunity\ModuleInternals\Core\InternalModule))\n#7 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(277): OxidCommunity\ModuleInternals\Core\ModuleStateFixer->fixExtensions(Object(OxidCommunity\ModuleInternals\Core\InternalModule))\n#8 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php(72): OxidCommunity\ModuleInternals\Core\ModuleStateFixer->restoreModuleInformation(Object(OxidCommunity\ModuleInternals\Core\InternalModule), 'extsearchmodfix')\n#9 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-community/moduleinternals/Core/InternalModule.php(242): OxidCommunity\ModuleInternals\Core\ModuleStateFixer->fix(Object(OxidCommunity\ModuleInternals\Core\InternalModule))\n#10 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/Module/ModuleList.php(637): OxidCommunity\ModuleInternals\Core\InternalModule->getTitle()\n#11 [internal function]: OxidEsales\EshopCommunity\Core\Module\ModuleList->_sortModules(Object(OxidCommunity\ModuleInternals\Core\InternalModule), Object(OxidCommunity\ModuleInternals\Core\InternalModule))\n#12 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/Module/ModuleList.php(572): uasort(Array, Array)\n#13 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/Module/ModuleList.php(540): OxidEsales\EshopCommunity\Core\Module\ModuleList->getModulesFromDir('/home/vagrant/s...', 'd3')\n#14 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/Admin/ModuleList.php(34): OxidEsales\EshopCommunity\Core\Module\ModuleList->getModulesFromDir('/home/vagrant/s...')\n#15 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(453): OxidEsales\EshopCommunity\Application\Controller\Admin\ModuleList->render()\n#16 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(344): OxidEsales\EshopCommunity\Core\ShopControl->_render(Object(OxidEsales\Eshop\Application\Controller\Admin\ModuleList))\n#17 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(276): OxidEsales\EshopCommunity\Core\ShopControl->formOutput(Object(OxidEsales\Eshop\Application\Controller\Admin\ModuleList))\n#18 /home/vagrant/shared_folder/oxid_v610/source/modules/d3/modcfg/Modules/Application/Controller/d3_oxshopcontrol_modcfg_extension.php(163): OxidEsales\EshopCommunity\Core\ShopControl->_process('OxidEsales\\Esho...', NULL, NULL, NULL)\n#19 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(137): D3\ModCfg\Modules\Application\Controller\d3_oxshopcontrol_modcfg_extension->_process('OxidEsales\\Esho...', NULL, NULL, NULL)\n#20 /home/vagrant/shared_folder/oxid_v610/source/modules/d3/modcfg/Modules/Application/Controller/d3_oxshopcontrol_modcfg_extension.php(93): OxidEsales\EshopCommunity\Core\ShopControl->start('module_list', NULL, NULL, NULL)\n#21 /home/vagrant/shared_folder/oxid_v610/vendor/oxid-esales/oxideshop-ce/source/Core/Oxid.php(26): D3\ModCfg\Modules\Application\Controller\d3_oxshopcontrol_modcfg_extension->start()\n#22 /home/vagrant/shared_folder/oxid_v610/source/index.php(15): OxidEsales\EshopCommunity\Core\Oxid::run()\n#23 /home/vagrant/shared_folder/oxid_v610/source/admin/index.php(11): require_once('/home/vagrant/s...')\n#24 {main}\n"] []

It occurs on open the menue 'Moduls'.

Shop: CE 6.1.0 + CE 6.1.1
Rev Checkout ModulInternals: bdf51bf

duplicate code

As Maintainer I like to remove the effort in maintaining and to increase the quality by removeing duplicate code.

  • I found duplicate code in CheckConsistency.php

do not scan deactivated modules

  1. Don't check disabled modules
    There is no need to check disabled / never activated modules since they will always have "issues" in the form of inconsistencies between metadata.php and the database.
    bildschirmfoto 2018-11-28 um 00 44 09
    One could argue, that disabled modules don't belong to the modules directory but I don't think that this was the intention.

warning about duplicate controller

Not sure it this belongs here, but I see this when running the fix:states command in our project:

vagrant@oxidproject:~$ php /var/www/shop/vendor/bin/oxid fix:states -a
[warning] in shop 13: oxps/modulesconfig fixing module controllers
[warning]  (in md):array (
  'admin_oxpsmodulesconfigdashboard' => 'OxidProfessionalServices\\ModulesConfig\\Controller\\Admin\\Dashboard',
)
[warning]  (in db):array (
)
[ERROR]: duplicate controllers:OxidProfessionalServices\ModulesConfig\Controller\Admin\Dashboard

We have 41 shops and I see this message for all shops >= 13.

Would also be nice to add a space after duplicate controllers:

Option to disable blocks

Sometimes you want to change markup that a module have in it's templates.
Giving you the ability to disable/enable certain morule blocks gives you flexibility in overwriting blocks.

feature: check settings

Module internals should warn about typos:

            [
                'groub' => 'service',
                'name' => 'services_url_en',
                'tupe' => 'str',
            ],

and things like:

        [
            'group' => 'service',
            'name' => 'services_list_en',
            'type' => 'aarr',
            'value' => [
                'key': 'url'
                'value': 'translation in English'
            ],
            [
                'group' => 'service',
                'name' => 'services_url_en',
                'type' => 'str',
            ],
        ],

by checking for the correct

increase visibility of that project

currently that repository is attached to acirtautas/oxid-module-internals and by that all new pull requests by default have that main repository selected by default, also google ignores this repository. To improve that github was asked to detach that repository .

Case sensitive file exist check

When working on a operating system with case insensitive filesystem
the programmer needs a warning if hir has give the file a different case then in the metadata file.

The additional check from the kiwi edition will only work for the legacy autoloader when not using namespace.
TeamPull@b9f496f
For namespace a additional check could be implemented, that depends on the autoloader setting in the composer file of the module.

dependency to ps oxid console

dependency

use OxidProfessionalServices\OxidConsole\Core\ShopConfig;

is making modules internals kind of incompatible with oxrun

Empty version - after Installation new module

A new module is installed.
In this case, there is no from-Version inside the logmessage:
'ModuleXyz fixing module version from to 2.0.0.0 [] []'

This message is not wrong. But it looks like there was an error.
Is it possible to check if it's a new installation? Make it sense to add a second sentence like - 'New installation, no former Version set'?

$this->output->error("$sModuleId fixing module version from $old to $sModuleVersion");

feature: check for wrong metadata-version

Would be nice to check if the metadata-version < 2.0 and report an issue if we use namespaced classes in that module.

Currently, we see just not found files in the State-Tab, but the code seems to work fine.

dry run and check command

command to scan for issues without fixing.
I am not sure why people would like to have a scan without fix, but it was requested to have a console command that can be periodically scan for issues.

I am planing to do it by having a --dry-run option on the module:fix command.

"fix-states -a" in console prints out a lot of notice warnings

Issue present in 3.0.0-alpha4. Happens when running vendor/bin/oxid fix:states -a. The diff function gets multidimensional arrays like this to compare:

[
    'vendor/module' =>
        [
            'something' => 'SomeNamespace\\SomeClass',
        ],
];

Then the function array_diff_assoc basically takes ['something' => 'SomeNamespace\\SomeClass'] and casts it to a string according to:
https://www.php.net/manual/en/function.array-diff-assoc.php#refsect1-function.array-diff-assoc-notes

Notice: Array to string conversion in /var/www/oxideshop/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php on line 373

Call Stack:
    0.0003     351720   1. {main}() /var/www/oxideshop/vendor/oxid-professional-services/oxid-console/bin/oxid:0
    0.0083     434568   2. OxidProfessionalServices\OxidConsole\Core\Application->run() /var/www/oxideshop/vendor/oxid-professional-services/oxid-console/bin/oxid:39
    0.0182     613632   3. OxidProfessionalServices\OxidConsole\Core\Application->doRun() /var/www/oxideshop/vendor/symfony/console/Application.php:117
    0.1721    4671056   4. OxidProfessionalServices\OxidConsole\Core\Application->doRun() /var/www/oxideshop/vendor/oxid-professional-services/oxid-console/src/Core/Application.php:80
    0.1723    4671056   5. OxidProfessionalServices\OxidConsole\Core\Application->doRunCommand() /var/www/oxideshop/vendor/symfony/console/Application.php:185
    0.1724    4674040   6. OxidProfessionalServices\OxidConsole\Core\Application->doRunCommand() /var/www/oxideshop/vendor/oxid-professional-services/oxid-console/src/Core/Application.php:149
    0.1725    4674040   7. OxidCommunity\ModuleInternals\Command\ModuleFixCommand->run() /var/www/oxideshop/vendor/symfony/console/Application.php:835
    0.1726    4676784   8. OxidCommunity\ModuleInternals\Command\ModuleFixCommand->execute() /var/www/oxideshop/vendor/symfony/console/Command/Command.php:245
    0.4874    8163840   9. OxidCommunity\ModuleInternals\Command\ModuleFixCommand->executeForShop() /var/www/oxideshop/vendor/oxid-community/moduleinternals/Command/ModuleFixCommand.php:78
    0.4874    8165192  10. OxidCommunity\ModuleInternals\Core\ModuleStateFixer->cleanUp() /var/www/oxideshop/vendor/oxid-community/moduleinternals/Command/ModuleFixCommand.php:115
    0.5054    8400352  11. OxidCommunity\ModuleInternals\Core\ModuleStateFixer->cleanUpControllers() /var/www/oxideshop/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php:145
    0.5055    8402424  12. OxidCommunity\ModuleInternals\Core\ModuleStateFixer->diff() /var/www/oxideshop/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php:526
    0.5075    8402480  13. array_diff_assoc() /var/www/oxideshop/vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php:373

broken subshops in OXID version 6.2

In a OXID 6.2 project I'm not able to select a newly created subshop in the backend. The problem happens only if this module is activated (version c69cbf6)

Log-Entry:

[2020-01-06 15:38:25] OXID Logger.ERROR: Unable to load shop config values from database ["[object] (OxidEsales\\Eshop\\Core\\Exception\\DatabaseException(code: 0): Unable to load shop config values from database at /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Config.php:381, Exception(code: 0):  at /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Config.php:384)\n[stacktrace]\n#0 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Config.php(427): OxidEsales\\EshopCommunity\\Core\\Config->initVars(3)\n#1 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(579): OxidEsales\\EshopCommunity\\Core\\Config->init()\n#2 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(134): OxidEsales\\EshopCommunity\\Core\\ShopControl->_runOnce()\n#3 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Oxid.php(26): OxidEsales\\EshopCommunity\\Core\\ShopControl->start()\n#4 /var/www/oxideshop/source/index.php(15): OxidEsales\\EshopCommunity\\Core\\Oxid::run()\n#5 /var/www/oxideshop/source/admin/index.php(11): require_once('/var/www/oxides...')\n#6 {main}\n"] []

The problem is that the oxconfig table is empty:

mysql> SELECT OXID FROM oxconfig WHERE OXSHOPID = 3;
Empty set (0.00 sec)

mysql> SELECT OXID FROM oxshops WHERE OXID = 3;
+------+
| OXID |
+------+
|    3 |
+------+
1 row in set (0.00 sec)

How to reproduce this:

  1. create a subshop
  2. after hitting 'save' you will see the new shop, it is automatically selected
  3. Install
  4. Install and active this module
  5. create another shop
  6. You will see that the frame on the left (navigation) will show an error, there is also an error in the logfile.

Empty Status Page after installation via composer

A module is installed with composer.
First time after installation, the module title in Backend contains the message 'fixed'. But the status-Page in Backend for this modul ist empty(a white page but without an exception).

The file oxideshop.log contains some new entries, but they looks normal:
[2019-01-07 15:27:51] OXID Logger.ERROR: abc_module fixing module extensions [] []
[2019-01-07 15:27:51] OXID Logger.ERROR: abc_module fixing templates [] []
[2019-01-07 15:27:51] OXID Logger.ERROR: abc_module fixing module version from to 4.0.0.0 [] []
[2019-01-07 15:27:51] OXID Logger.ERROR: abc_module fixing module events [] []

In Checkconsistency, the new modul isn't listed.

But after the module activation, all is fine for the status page and Checkconsistency.

Looks like a bug?

Optimize issue detection in module list

IMHO there are two parts with potential to optimize issue detection:

  1. [EDIT by Keywan] moved to #35
  2. Don't check for active settings not defined in metadata.php
    After enabling the ddoewysiwyg module the "Issue found!" flag persists. This is because this module registers two config values (1, 2) in the onActivate event which aren't defined in the metadata.php. Either this is bad practice and ddoewysiwyg should get fixed or the following part should be removed or mitigated to not raise the "Issue found!" flag:
    if (!isset($aResult[ $sName ])) {
    $aResult[ $sName ] = -1;
    $this->stateFine = false;

acceptance test

As maintainer I like to have a example acceptance running in the ci

EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND: ModuleExtensionCleanerDebug

$cleaner = oxNew(ModuleExtensionCleanerDebug::class);

This dependency to oxid-console should get either removed or registered via composer. An a fresh CE 6.1.1 this results in:

OXID Logger.ERROR: EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND OxidProfessionalServices\OxidConsole\Core\Module\ModuleExtensionCleanerDebug ["[object] (OxidEsales\\Eshop\\Core\\Exception\\SystemComponentException(code: 0): EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND OxidProfessionalServices\\OxidConsole\\Core\\Module\\ModuleExtensionCleanerDebug at /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/UtilsObject.php:222)\n[stacktrace]\n#0 /var/www/oxid/source/oxfunctions.php(101): OxidEsales\\EshopCommunity\\Core\\UtilsObject->oxNew('OxidProfessiona...')\n#1 /var/www/oxid/source/modules/oxcom/moduleinternals/Core/ModuleStateFixer.php(23): oxNew('OxidProfessiona...')\n#2 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/UtilsObject.php(231): OxidCommunity\\ModuleInternals\\Core\\ModuleStateFixer->__construct()\n#3 /var/www/oxid/source/oxfunctions.php(101): OxidEsales\\EshopCommunity\\Core\\UtilsObject->oxNew('OxidCommunity\\\\M...')\n#4 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/Registry.php(403): oxNew('OxidCommunity\\\\M...')\n#5 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/Registry.php(419): OxidEsales\\EshopCommunity\\Core\\Registry::createObject('OxidCommunity\\\\M...')\n#6 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/Registry.php(46): OxidEsales\\EshopCommunity\\Core\\Registry::getObject('OxidCommunity\\\\M...')\n#7 /var/www/oxid/source/modules/oxcom/moduleinternals/Core/InternalModule.php(497): OxidEsales\\EshopCommunity\\Core\\Registry::get('OxidCommunity\\\\M...')\n#8 /var/www/oxid/source/modules/oxcom/moduleinternals/Core/InternalModule.php(683): OxidCommunity\\ModuleInternals\\Core\\InternalModule->checkModuleController()\n#9 /var/www/oxid/source/modules/oxcom/moduleinternals/Core/InternalModule.php(196): OxidCommunity\\ModuleInternals\\Core\\InternalModule->checkState()\n#10 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/Module/ModuleList.php(637): OxidCommunity\\ModuleInternals\\Core\\InternalModule->getTitle()\n#11 [internal function]: OxidEsales\\EshopCommunity\\Core\\Module\\ModuleList->_sortModules(Object(OxidCommunity\\ModuleInternals\\Core\\InternalModule), Object(OxidCommunity\\ModuleInternals\\Core\\InternalModule))\n#12 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/Module/ModuleList.php(572): uasort(Array, Array)\n#13 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/Module/ModuleList.php(540): OxidEsales\\EshopCommunity\\Core\\Module\\ModuleList->getModulesFromDir('/var/www/oxid/s...', 'bestit')\n#14 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/Admin/ModuleList.php(34): OxidEsales\\EshopCommunity\\Core\\Module\\ModuleList->getModulesFromDir('/var/www/oxid/s...')\n#15 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(453): OxidEsales\\EshopCommunity\\Application\\Controller\\Admin\\ModuleList->render()\n#16 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(344): OxidEsales\\EshopCommunity\\Core\\ShopControl->_render(Object(OxidEsales\\Eshop\\Application\\Controller\\Admin\\ModuleList))\n#17 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(276): OxidEsales\\EshopCommunity\\Core\\ShopControl->formOutput(Object(OxidEsales\\Eshop\\Application\\Controller\\Admin\\ModuleList))\n#18 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(137): OxidEsales\\EshopCommunity\\Core\\ShopControl->_process('OxidEsales\\\\Esho...', NULL, NULL, NULL)\n#19 /var/www/oxid/vendor/oxid-esales/oxideshop-ce/source/Core/Oxid.php(26): OxidEsales\\EshopCommunity\\Core\\ShopControl->start()\n#20 /var/www/oxid/source/index.php(15): OxidEsales\\EshopCommunity\\Core\\Oxid::run()\n#21 /var/www/oxid/source/admin/index.php(11): require_once('/var/www/oxid/s...')\n#22 {main}\n"] []

preserve tmpl block state on fix

if module internals fixes a module tpl block that is deactivated, it is somehow activating that block.
expectated behavior is, if a block was deactivated module internals should keep that state (even if for example the oxid needs to be rewritten)
reported by @tabsl via slack.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.