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

Fixed some of function does not exist bug for shop 6.2 #134

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nitinsinghoxidesales
Copy link
Contributor

We get below errors in OXID Shop 6.2 related to to this module.

'_deleteModuleEvents' does not exist or is not accessible!
'_deleteModuleVersions' does not exist or is not accessible!
Undefined index: vendor/oxid-community/moduleinternals/Core/ModuleStateFixer.php on line 590

Changes Done:

  1. We are validating if methods are exist before running it.
  2. Validate isset($onlyInBeforeFix[$core]) before checking with module chain.

@mprokopov
Copy link

Might be wrapping calls to _deleteTemplateFiles into the exception handling would be a better fix for that, as checking a method presence violates "tell, don't ask" OOP principle.

@nitinsinghoxidesales
Copy link
Contributor Author

Might be wrapping calls to _deleteTemplateFiles into the exception handling would be a better fix for that, as checking a method presence violates "tell, don't ask" OOP principle.

Thanks @mprokopov for your feedback.

Actually, function check for example _deleteTemplateFiles only because of backward compatibility. Shop 6.1 and 6.2 having different mechanism.

Ideally we should remove below code for shop 6.2 as it doesn't make sense. We are not reporting it as exception because its actually no error/ issue and it doesn't matter for shop 6.2 but for shop 6.1 function like _deleteTemplateFiles runs and does actions.
$this->output->warning("$sModuleId unregister templates:"); $this->_deleteTemplateFiles($sModuleId); $this->needCacheClear = true;

@alfredbez
Copy link
Collaborator

alfredbez commented Jun 10, 2020

I'm not sure if it makes sense to patch the existing version of module-internals to be compatible with OXID 6.2 since so much has changed especially in the modules area.

I have the feeling that this module is too tightly coupled to the shop-core.

This is not related to your fix, but just my general thoughts on this module and the problems we have with 6.2.

@alfredbez alfredbez removed their request for review February 15, 2022 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants