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
Fix not handled new tab ID during migration #8020
Fix not handled new tab ID during migration #8020
Conversation
1140ab4
to
9b010fe
Compare
I just found that the old tab IDs relation also affect this: http://forge.prestashop.com/browse/BOOM-3209 I'm working on on solution but this is linked to this PR. I think I'll update it later. |
I updated the PR title and description. I also add a commit for access tab fix, but this is incomplete. The access map is indeed restored, but with currently three issues: First, on this capture: We have a "Multiboutique" right (yellow highlight). I don't know from where this tab appeared, and it appeared twice! We retrieve some module rights (red highlight), but I don't think they are supposed to be here. On this capture: You can see that the module access map is completely empty, even after module upgrade process. This is maybe because I didn't try anything yet with the I'm still working on it, but if you have some clue to give, I'm hearing. 👍 |
4135248
to
f75d7eb
Compare
Update: According to the old 1.6 app, I found the "Multiboutique" part, but I still don't know why it appeared twice on 1.7. Plus, the module lines seem to be legitimate, but are misplaced. This is maybe because I deactivate |
Concerning module access, it seems to be another problem: Corresponding authorization role are not created at all. On a fresh install DB, if I run: SELECT * FROM `ps_authorization_role` WHERE `slug` LIKE '%mod_module%' I got 208 rows. On a migrated from 1.6 database, I got nothing. |
Please see #8021 for module missing roles. |
f75d7eb
to
1f01521
Compare
I did a rebase of my branch. Ready for review. |
install-dev/upgrade/sql/1.7.0.0.sql
Outdated
|
||
/* Save the new IDs */ | ||
UPDATE `PREFIX_tab_transit` tt SET `id_new_tab` = ( | ||
SELECT `id_tab` FROM `PREFIX_tab` WHERE CONCAT(`class_name`, COALESCE(`module`, '')) LIKE tt.`key` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use LIKE
and not =
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless tt.key
contains a search pattern, =
would be indeed better.
install-dev/upgrade/sql/1.7.0.0.sql
Outdated
UPDATE `PREFIX_employee` e SET `default_tab` = ( | ||
SELECT IFNULL(`id_new_tab`, | ||
/* If the tab does not exist anymore, fallback to the dashboard. */ | ||
(SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` LIKE 'AdminDashboard' AND `module` IS NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use LIKE
and not =
?
1f01521
to
4165128
Compare
@eternoendless I did a quick modification to replace |
Hello @soullivaneuh, sorry for the delay. I want a last check by @jocel1, it's our MySQL master :) For me it's ok, so I put my approuval on this. Have a nice day! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It seems this can be merged now. :-) |
We are still waiting for a review (see BOOM-3209) |
@LittleBigDev Oh, do I have to do anything else or just wait? |
Waiting for QA. Ping @vincentbz, @marionf, @prasanthSelvar |
Hello @soullivaneuh, Sorry for the delay. |
Tab IDs are changed since 1.7.0.0 and employee default_tab reference was wrong. Fixes http://forge.prestashop.com/browse/BOOM-3269
This have to be done in order to make new access structure migration working.
705b294
4165128
to
705b294
Compare
Hello @prasanthSelvar,
Could you please be more specific? You mean the PR don't fix the issue? Also could you please retry? I did a rebase since the other one is merged.
I did a cli upgrade with having to disable some methods. Please see #8020 (comment) Also, this PR is quite old and I don't fully remember the issue, but by whiling on the history, I see I did report some not resolved issues and asking for some clues: #8020 (comment) If I didn't say anything else, the help is still needed. I'll try to work again on the PR soon but I'm afraid I will be stuck at the same conclusion. |
Thank you @soullivaneuh ! Better late than never :) |
Note this will fix an issue only for people who makes an 1.6 >> 1.7 upgrade from now. Merchants already on PS 1.7.0.0 probably need a new upgrade file. |
http://forge.prestashop.com/browse/BOOM-3209
This change is