Page 1 of 1

[fixed] Upgrade issues with default admin user

Posted: Tue Jul 22, 2014 8:40 pm
by zigge
Allright. Skipped my provider and are running tests on my own linux server, using a copy of my working site, running cmsms 1.11.10.

Upgrade goes well, but when done, my site only shows "oops!"

Logging into admin, I am missing ALOT of section(have a new install of 2.0 in parallell).

I only have CMS, Content and Layout. No Site Admin, Extensions, User Management etc.

Almost like my admin user is not corretly recognized as admin user.

Tried to remove all third party modules before upgrade, but no difference.

Also, I cannot alter any pages under Content. Template on all pages showing '** ERROR **"

Going to Design Manager gives following errors:

Notice: Undefined variable: templates in /var/www/skkdev/modules/DesignManager/action.defaultadmin.php on line 97

Notice: Undefined variable: templates in /var/www/skkdev/modules/DesignManager/action.defaultadmin.php on line 191

As said, a new beta install on the sam server works flawless.

Re: Upgrade does not really work....

Posted: Wed Jul 23, 2014 8:34 am
by zigge
Allright, further troubleshooting done.

Before upgrade, created a new user 'admin' with Admin role. My default admin user had different name, so just to rule out name issues, I did this.

Upgraded.

Logged in in admin with my default user, only limited options with lot of errores.

Logged out and logged in with my new 'admin' user, and now I have alot more in the admin panel.

However, under User management, there is no groups anymore. This could be the reason for my default admin user does not work.

I conclude that groups are not migrated properly, and CMSMS looks for user 'admin' if no groups are found.

Further investigation will follow

Re: Upgrade issues with default admin user

Posted: Wed Jul 23, 2014 8:50 am
by zigge
And debug shows:
(mysqli): SELECT group_id, group_name, group_desc, active FROM cms_groups ORDER BY group_id
Error (1054): Unknown column 'group_desc' in 'field list'

So it seems that a column is supposed to be added during upgrade but have not been done.

Adding column manually, and groups shows up. However, my default admin user(with different name than admin, that was created back in the ol' 1.7 days...), is still not working.

Re: Upgrade issues with default admin user

Posted: Wed Jul 23, 2014 11:38 am
by zigge
Further investigation after tracing SQL statements, shows that:

- A clean install do an ALTER TABLE on table 'groups' adding a group_desc field.

- An upgrade does NOT do an ALTER TABLE on table 'groups'.

Checking out latest version from SVN and going through the upgrade sources, there is no ALTER TABLE on that table. This I would consider a bug, and can easily be missed if your default user is called 'admin', but as in my case, where defalt admin had a different name, permissions when bananas.

This is one of the issues I have found. I still have tonnes of other issues, with next beeing tracing why the relations between stuff are not beeing updated corectly. An upgrade leaves the 'layout_tplassoc' table completly empty.

Thing is, the upgrade does not show ANY errors during upgrade. Nor do I get any bas SQL statements during upgrade in MySQL log. Seems that some things are missing.

Re: Upgrade issues with default admin user

Posted: Wed Jul 23, 2014 2:20 pm
by calguy1000
that's already been fixed, and will be included with the upcoming beta 2