Page 1 of 1

Missing Permissions (and this missing features available) after Upgrade

Posted: Wed Sep 20, 2006 12:59 pm
by Matt Jason H
As in image attached, controls for ordering of content and some table headers appear to be missing.

Updated from a pre 1.0 version to 1.0.1.

Any ideas?

Cheers for any help in advance,
Matt

[gelöscht durch Administrator]

Re: Missing parts of table on Content -> Pages after update

Posted: Wed Sep 20, 2006 1:34 pm
by calguy1000
That's not a bug.

a) there's no room for table headers there
b) you can't perform bulk actions on the default page

Re: Missing parts of table on Content -> Pages after update

Posted: Thu Sep 21, 2006 8:00 am
by Matt Jason H
I see.

... but how do i access the controls for reordering pages in that case, and make content active and inactive, these controls are no longer shown on the content screen after the upgrade?

The documentation says this...

"Move -- Click the arrows to move a page upwards or downwards in the page hieararchy."

"Active -- A page can only be accessed on your site if it is active (Image:true.gif). If it’s not active (Image:false.gif) it is not shown in the menu and can’t be accessed by a direct link, but it still exists ”in the system”. That is you can edit a page until you think it’s ready to be released, which is when you make it active."

Matt

Re: Missing parts of table on Content -> Pages after update

Posted: Thu Sep 21, 2006 1:14 pm
by calguy1000
Check your permissions, I bet you don't have the 'modify page structure' permission. (or whatever it's called).

Re: Missing parts of table on Content -> Pages after update

Posted: Thu Sep 21, 2006 1:37 pm
by Matt Jason H
This is the admin account, i've checked and it has all permissions.  ???

Re: Missing parts of table on Content -> Pages after update

Posted: Fri Sep 22, 2006 7:53 am
by Matt Jason H
I've upgraded to 1.0.2 and i'm still getting this problem.

Re: Missing parts of table on Content -> Pages after update

Posted: Fri Sep 22, 2006 2:19 pm
by Dee
Very odd, I know of at least one other person experiencing the same problem (see http://forum.cmsmadesimple.org/index.ph ... l#msg37399)

The code that shows the reorder buttons and the (de-)activation options is surrounded by

Code: Select all

if (check_permission($userid, 'Modify Page Structure'))
{
}
So it looks as if somehow the check_permission function returns false in your case.

Re: Missing parts of table on Content -> Pages after update

Posted: Fri Sep 22, 2006 2:47 pm
by Matt Jason H
I see...

That item is also missing from my list of permissions...

I think the problem could be that i've updated from a version that didn't have this as a permission, and jumped to a version whos upgrader doesn't write that permission into the permissions database table, so it winds up missing. Perhaps more frequent upgraders wouldn't encounter this problem. Just a guess, though.

[gelöscht durch Administrator]

Re: Missing Permissions (and this missing features available) after Upgrade

Posted: Fri Sep 22, 2006 5:10 pm
by tsw
upgrading from version to another should go through all revisions that were in between these versions

this might be a bug in installer from which version were you upgrading ?

Re: Missing Permissions (and this missing features available) after Upgrade

Posted: Fri Sep 22, 2006 8:25 pm
by Dee
Matt Jason H wrote: I think the problem could be that i've updated from a version that didn't have this as a permission, and jumped to a version whos upgrader doesn't write that permission into the permissions database table, so it winds up missing.
Hmm, theoretically that could only happen if you updated to an svn-version between these commits:
http://trac.cmsmadesimple.org/cgi-bin/t ... geset/3297 (permission added)
http://trac.cmsmadesimple.org/cgi-bin/t ... geset/3299 (database schema version incremented)

The (permission and) code that creates the permission has been available since 1.0beta6.

You did run install/upgrade.php so the database schema is upgraded?

Re: Missing Permissions (and this missing features available) after Upgrade

Posted: Mon Sep 25, 2006 10:16 am
by Matt Jason H
Cheers for all the help so far....

I haven't used any SVN versions on this site.

I did run upgrade.php and it told me my database schema needed to be upgraded, i confirmed, it returned a message saying it had done so. It may have been 13 to 20something, i can't quite remember.

Re: Missing Permissions (and this missing features available) after Upgrade

Posted: Mon Sep 25, 2006 2:49 pm
by calguy1000
I reproduced this issue on another site that I upgradef from 0.13 there'll probably be a 1.0.3 out shortly to solve this problem.

Re: Missing Permissions (and this missing features available) after Upgrade

Posted: Mon Sep 25, 2006 4:54 pm
by Dee
Tried to reproduce this issue but the permission is added as it should when I upgrade 0.13 to 1.0.2

You are now running schema version 19 and you need to be upgraded to version 25.
Creating "Modify Page Structure" permission...[done]

Executed sql:

Code: Select all

INSERT INTO `cms_permissions`
    (permission_id, permission_name, permission_text, create_date, modified_date)
        VALUES
    ('43', 'Modify Page Structure', 'Modify Page Structure', '2006-09-25 18:42:56', '2006-09-25 18:42:56')

INSERT INTO `cms_group_perms`
        (group_perm_id, group_id, permission_id, create_date, modified_date)
            VALUES
        ('172', 1, 43, '2006-09-25 18:42:56', '2006-09-25 18:42:56')
So, when does this issue occur? Only situation I can think of ATM is when PHP's max_execution_time is exceeded by upgrade.php or something.

Re: Missing Permissions (and this missing features available) after Upgrade

Posted: Tue Sep 26, 2006 3:30 pm
by Dee
As a workaround you can try adding it manually:
* check the value in table cms_permissions_seq field id (for example 43) and increment it with 1 (change it to 44)
* use that new value (44 in this case) in an insert query:

Code: Select all

INSERT INTO `cms_permissions` (
permission_id,
permission_name,
permission_text,
create_date,
modified_date
)
VALUES (
'44', 'Modify Page Structure', 'Modify Page Structure', NOW(), NOW()
)

Re: Missing Permissions (and this missing features available) after Upgrade

Posted: Tue Sep 26, 2006 4:25 pm
by Dee
There seems to be a bug that prevents the permission from being added when full ADOdb is used instead of ADOdb lite.

This PHP script (remove the .txt extension) creates the "Modify Page Structure" permission if it somehow isn't created on upgrade.
Upload the file to your CMSMS web root and run it (http://yoursite.com/cmsms/amps.php) from your browser.

[gelöscht durch Administrator]