Forums | Mahara Community
Support
/
Mahara 17.10.9 error: "failed to upgrade"
16 May 2019, 20:58
Hello.
After updating Mahara 17.04.10 to Mahara 17.10.9 the following error appears in the administration screen:
Upgrades
The following upgrades are ready:
"blocktype.externalvideo" - from - 1.1.0 (2015112400) - to - 1.2.0 (2017092500)
Every time I access this screen, the following message appears:
... and when I press the "Run upgrade" button it always shows the following error:
Performing upgrades...
"Failed to upgrade"
Apparently Mahara is working correctly, even the module "blocktype.externalvideo", but I can not get the update of that module to finish correctly.
What I can do?
Thank you
Cheers
Juan
17 May 2019, 8:12
Hi Juan,
The error you are getting looks to be related to the latest update change on that plugin.
To find out what is going on can you check your database for the following:
SELECT * FROM iframe_source WHERE name LIKE 'Youtube [%';
If you see results like the following:
prefix | name
---------------------------------+------------------------
www.youtube-nocookie.com/embed/ | Youtube [privacy mode]
And query:
SELECT * FROM iframe_source_icon WHERE name LIKE 'Youtube [%';
If you see results like the following:
name | domain
------------------------+-----------------
Youtube [privacy mode] | www.youtube.com
Then it means the value the update is trying to add already exists so we can ignore the update by setting
UPDATE blocktype_installed SET version = '2017092500', release = '1.2.0' WHERE name = 'externalvideo';
If those lines are not there then can you check the error log to see why the update fails
You can manually do the update by doing the following 3 commands:
INSERT INTO iframe_source (prefix, name) VALUES ('www.youtube-nocookie.com/embed/', 'Youtube [privacy mode]');
INSERT INTO iframe_source_icon (name, domain) VALUES ('Youtube [privacy mode]', 'www.youtube.com');
UPDATE blocktype_installed SET version = '2017092500', release = '1.2.0' WHERE name = 'externalvideo';
Cheers
Robert
18 May 2019, 5:32
Hi Robert,
Thank you very much for your quick response and for your help.
I have managed to solve the problem by doing the 3 commands that you indicate in your message.
Now everything is correct.
Cheers
Juan
21 May 2019, 20:30
Hi, Robert,
In my previous message I forgot to tell you that there is a syntax error in the third command (UPDATE) when it is done with MySQL 5.7
For MySQL 5.7 the word "release" is one of the "reserved words", and for this reason it is necessary to write the command like this:
UPDATE blocktype_installed SET version = '2017092500', `release` = '1.2.0' WHERE name = 'externalvideo';
Cheers
Juan