Shape 5

General Category => General Talk/Questions/Comments => : cspgsl September 19, 2017, 06:12:04 PM



: Unable to update to 3.8 in Business Line Shaper
: cspgsl September 19, 2017, 06:12:04 PM
Installed the Business Line Shaper today and cannot update to 3.8 - getting Unknown Error 1504

Any suggestions?

Thanks


: Re: Unable to update to 3.8 in Business Line Shaper
: mikek September 19, 2017, 07:29:25 PM
Hello,

I'm still looking into this and haven't gotten very far with it yet. It seems the 3.8 upgrade process does not work properly. The error you are receiving is because the upgrade is not adding client_id or asset_id to the menu_type table in the database. I am not sure when those were added to the table, but they were definitely not in 3.5. Any upgrade, like upgrading to 3.8 should just add these but it's currently not.

I have manually added them to a local install, which gets me into the backend again, but now none of my components are listed anymore. So this seems to be a major bug in the Joomla upgrade process, so I will need some more time to investigate unless Joomla fixes this in the meantime.


: Re: Unable to update to 3.8 in Business Line Shaper
: cspgsl September 20, 2017, 04:36:00 AM
Thanks, I will wait further updates


: Re: Unable to update to 3.8 in Business Line Shaper
: mikek September 20, 2017, 09:57:59 AM
Hello,

I've got a workaround working. I did submit the issue to Joomla and they did acknowledge the issue as well, so hopefully they can correct this in an updated patch.

Here's the workaround in the meantime:

1. Run the commands below in phpmyadmin on your database. Replace xxxxx with your own database prefix. This will add the missing columns to at least get you up and running.

   --Note, this step can be done before or after upgrading to 3.8. If you do it before you will most likely be shown an sql error message after the upgrade is complete; you can ignore this. It is just saying that the updates were already there.

2. Once that's done you can use the administrator portion of your site again, however you must go to: Extensions/Manage/Database and click on the Fix button in the upper left corner to fix any remaining database fixes that didn't occur during the upgrade.


Sql commands (replace xxxxx with your prefix):

ALTER TABLE `xxxxx_menu_types` ADD COLUMN `client_id` int(11) NOT NULL DEFAULT 0;
UPDATE `xxxxx_menu` SET `published` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu';
UPDATE `xxxxx_menu`
   SET `menutype` = 'main_is_reserved_133C585'
 WHERE `client_id` = 0
   AND `menutype` = 'main'
   AND (SELECT COUNT(`id`) FROM `xxxxx_menu_types` WHERE `client_id` = 0 AND `menutype` = 'main') > 0;

UPDATE `xxxxx_modules`
   SET `params` = REPLACE(`params`,'"menutype":"main"','"menutype":"main_is_reserved_133C585"')
 WHERE `client_id` = 0
   AND (SELECT COUNT(`id`) FROM `xxxxx_menu_types` WHERE `client_id` = 0 AND `menutype` = 'main') > 0;

UPDATE `xxxxx_menu_types`
   SET `menutype` = 'main_is_reserved_133C585'
 WHERE `client_id` = 0
   AND `menutype` = 'main';
UPDATE `xxxxx_menu`
   SET `client_id` = 1
 WHERE `menutype` = 'main';
UPDATE `xxxxx_menu`
   SET `menutype` = 'main'
 WHERE `client_id` = 1
   AND `menutype` = 'menu';
UPDATE `xxxxx_menu`
   SET `menutype` = 'main',
       `client_id` = 1
 WHERE `menutype` = 'menu'
   AND (SELECT COUNT(`id`) FROM `xxxxx_menu_types` WHERE `client_id` = 0 AND `menutype` = 'menu') = 0;
DELETE FROM `xxxxx_menu_types`
 WHERE `client_id` = 1
   AND `menutype` IN ('main', 'menu');