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

Limit subquery results in upgrade sql 1.7.0.0 #9258

Merged

Conversation

Quetzacoalt91
Copy link
Member

@Quetzacoalt91 Quetzacoalt91 commented Jul 4, 2018

Questions Answers
Branch? 1.7.4.x
Description? With #8020, an issue has been introduced in 1.6 > 1.7 upgrade, because some tabs are defined several times in the tab.xml file. This PR limits the rows from a subquery, used later for migrating the permissions.
Type? bug fix
Category? IN
BC breaks? Nope
Deprecations? Nope
Fixed ticket? /
How to test? Upgrade a shop from 1.6 to 1.7

Issue during upgrade

https://travis-ci.org/PrestaShop/autoupgrade/jobs/399632787

=== Step upgradeDb
WARNING - 
            <div class="upgradeDbError">
            [WARNING] SQL 1.7.0.0
            1242 in /* Save the new IDs */
UPDATE `ps_tab_transit` tt SET `id_new_tab` = (
  SELECT `id_tab` FROM `ps_tab` WHERE CONCAT(`class_name`, COALESCE(`module`, '')) = tt.`key`
): Subquery returns more than 1 row</div>
ERROR - SQL 1.7.0.0 1242 in /* Save the new IDs */
UPDATE `ps_tab_transit` tt SET `id_new_tab` = (
  SELECT `id_tab` FROM `ps_tab` WHERE CONCAT(`class_name`, COALESCE(`module`, '')) = tt.`key`
): Subquery returns more than 1 row

Duplicated tab


This change is Reviewable

@prestonBot prestonBot added 1.7.4.x Branch Bug Type: Bug labels Jul 4, 2018
@mickaelandrieu mickaelandrieu added this to the 1.7.4.1 milestone Jul 5, 2018
@PierreRambaud PierreRambaud added QA ✔️ Status: check done, code approved Waiting for QA Status: action required, waiting for test feedback and removed QA ✔️ Status: check done, code approved labels Jul 5, 2018
@mbadrani mbadrani self-assigned this Jul 6, 2018
@mbadrani
Copy link
Contributor

mbadrani commented Jul 6, 2018

After following the differents steps, I cannot proceed due to an error on my shop 1.6.1.19 > 1.7.4.0

Analyzing the situation...Shop deactivated. Now downloading... (this can take a while)
Download complete. Now extracting...
[Ajax / Server Error for action unzip] textStatus: "error " errorThrown:"Internal Server Error " jqXHR: "
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/modules/autoupgrade/classes/ZipAction.php on line 223
{"nextQuickInfo":[""/latest" directory has been emptied","Using class ZipArchive...","Archive extracted","Using class ZipArchive..."],"nextErrors":["[INTERNAL] /var/www/html/modules/autoupgrade/classes/ZipAction.php line 223 - Maximum execution time of 30 seconds exceeded"],"error":true,"next":"error"}"

@mbadrani mbadrani removed their assignment Jul 6, 2018
@marionf
Copy link
Contributor

marionf commented Jul 6, 2018

I have the issue below with the auto upgrade module, so can't test this PR

capture d ecran_17

Solved with: PrestaShop/ps_customtext#13

@marionf marionf added QA ✔️ Status: check done, code approved and removed Waiting for QA Status: action required, waiting for test feedback labels Jul 9, 2018
@PierreRambaud PierreRambaud merged commit bd4b696 into PrestaShop:1.7.4.x Jul 9, 2018
@PierreRambaud
Copy link
Contributor

Thanks @Quetzacoalt91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.4.x Branch Bug Type: Bug QA ✔️ Status: check done, code approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants