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

Cli upgrade 1.3.12 -> 1.5.5 no routes module table #3887

Closed
Kaik opened this Issue Jan 10, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Kaik
Copy link
Contributor

Kaik commented Jan 10, 2018

Q A
Zikula Version 1.5.5, 1.5.4
PHP Version 7.x

Expected behavior

Fully installed routes module.

Actual behavior

After "successful" (no errors even with --vvv) upgrade using cli routes module is installed but routes table is missing.
When viewing routes module no routes table error is shown. No error during the upgrade I cannot find any logs.

Steps to reproduce

Upgrade 1.3.1x using cli I have tested using my own db and test1310.sql

@Kaik

This comment has been minimized.

Copy link
Contributor

Kaik commented Jan 11, 2018

Hmm, same things happen when the core is upgraded via a web interface but does not happen on install.
Install procedure does not fire here at all https://github.com/zikula/core/blob/1.5/src/lib/Zikula/Bundle/CoreInstallerBundle/Controller/AjaxUpgradeController.php#L96
Module settings are not present in module_vars and module is not assigned to the admin_module category in DB but its state is active in modules table.

I have not tested this yet but most probably upgrade modules procedure which is called before routes module install is switching module state to installed that would explain why the module is in the active state.
https://github.com/zikula/core/blob/1.5/src/lib/Zikula/Bundle/CoreInstallerBundle/Controller/AjaxUpgradeController.php#L133
Routes module installer does not have any old version check in upgrade method so in theory it just returns true whatever you call it with...

Ok I think I got it
This line sets $this->currentVersion = (version_compare($currentVersion, '1.4.0', '<')) ? '1.4.0' : $currentVersion; to 1.4.0 in case of version lower taht 1.4.0 !!!
https://github.com/zikula/core/blob/1.5/src/lib/Zikula/Bundle/CoreInstallerBundle/Controller/AjaxUpgradeController.php#L52
And this line runs or not routes module installer basing on $this->currentVersion relation to 1.4.0...
https://github.com/zikula/core/blob/1.5/src/lib/Zikula/Bundle/CoreInstallerBundle/Controller/AjaxUpgradeController.php#L92

So that is for sure the reason why it is not fully installed.

I do not know why this is done this way... why any version lower than 1.4.0 is set to 1.4.0? most probably for this https://github.com/zikula/core/blob/1.5/src/lib/Zikula/Bundle/CoreInstallerBundle/Controller/AjaxUpgradeController.php#L164

I'm not sure about a right solution maybe change compare point to 1.3.99 instead of 1.4.0 ? and I do not know how it will work together with upgrade part maybe add another condition to perform routes module upgrade only when currentversion is >=1.4.0?

@Kaik Kaik referenced this issue Jan 12, 2018

Merged

Fix upgrade procedure for core 1.3.x #3888

1 of 2 tasks complete

@Guite Guite added this to the 1.5.5 milestone Feb 13, 2018

@Guite

This comment has been minimized.

Copy link
Member

Guite commented Feb 14, 2018

Fixed in #3888.

@Guite Guite closed this Feb 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment