Edit by non-admin user overwrites page alias (CMSMS 2.2.3.1)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Bash Gordon

Edit by non-admin user overwrites page alias (CMSMS 2.2.3.1)

Post by Bash Gordon »

A serious problem which was already observed in an earlier version (2.0.1) but was fixed in 2.1 reappeared (viewtopic.php?f=8&t=73732):

If a non-admin users edits a page the page alias is overwritten by a default page alias generated from the menu text. The problem does not occur for admin users (which also get an option tab to manually edit the page alias).

No idea where to search for the problem.

Any input or help would be appreciated. Thanks!
Bash
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Edit by non-admin user overwrites page alias (CMSMS 2.2.

Post by paulbaker »

Confirmed on 2.2.3.1.

My test method:
Login as main admin
Create a user "testuser" with "Modify Any Page" NOT ticked
Create page title "test" and set page alias to "pagealias"
Give that user permission to edit the page you created (in permissions tab "Additional editors")
Logout
Login as testuser
Content Manager - you will see in the Content Manager page list that the test page has alias "pagealias"
Edit the page
Submit the changes
You will see in the Content Manager page list that the page alias has changed from "pagealias" to "test"

----------------------------------------------
Cms Version: 2.2.3.1
Installed Modules:
AdminSearch: 1.0.4
CMSContentManager: 1.1.6
CMSMailer: 6.2.14
CmsJobManager: 0.1.1
DesignManager: 1.1.3
FileManager: 1.6.4
FilePicker: 1.0.1
FormBuilder: 0.8.1.6
MenuManager: 1.50.3
MicroTiny: 2.2.1
ModuleManager: 2.1.2
Navigator: 1.0.8
News: 2.51.3
Printing: 1.1.2
Search: 1.51.2
ThemeManager: 1.1.8

Config Information:
php_memory_limit:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/London
permissive_smarty: false

Php Information:
phpversion: 5.6.31
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 32767
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 30
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On

Performance Information:
allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: Off (False)
Server Information:
Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 3.10.0-714.10.2.lve1.4.63.el7.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.1.24
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

Permission Information:
tmp: /home/cthuk/public_html/tw/tmp (0755)
tmp_cache: /home/cthuk/public_html/tw/tmp/cache (0755)
templates_c: /home/cthuk/public_html/tw/tmp/templates_c (0755)
modules: /home/cthuk/public_html/tw/modules (0755)
uploads: /home/cthuk/public_html/tw/uploads (0755)
File Creation Mask (umask): /home/cthuk/public_html/tw/tmp/cache (0755)
config_file: 0444
----------------------------------------------
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Bash Gordon

Re: Edit by non-admin user overwrites page alias (CMSMS 2.2.

Post by Bash Gordon »

The problem persists in 2.2.4. Any idea for a workaround or when this will be fixed?

This problem makes the CMS basically unusable in a multiuser environment :(

Best,
Bash
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Edit by non-admin user overwrites page alias (CMSMS 2.2.

Post by paulbaker »

I just ran through my test method (as described earlier in this thread) on a newly updated 2.2.4 site and the page alias stays as it was set ("pagealias"). So I would say this is fixed.
After editing as testuser
After editing as testuser
Can you describe a test method to show otherwise?
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Bash Gordon

Re: Edit by non-admin user overwrites page alias (CMSMS 2.2.

Post by Bash Gordon »

Can you describe a test method to show otherwise?
Ok, took me some time to find the relevant setting. With 2.2.4, the user has to be the owner of the page. But if this is the case the problem is still present.

I followed exactly your steps described above with the only difference that I made testuser the owner of the test page. Now, again alias is renamed from pagealias to test on submit (see attach).
after_owner.png
Indeed the problem does no longer occur if the user is not the owner. But users should be able to edit their own pages...

Thanks! Best,
Bash
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Edit by non-admin user overwrites page alias (CMSMS 2.2.

Post by paulbaker »

Confirmed on 2.2.4. :'(

My test method, with changes to above method marked in bold and strikeout:

Login as main admin
Create a user "testuser" with "Modify Any Page" NOT ticked
Create page title "test" and set page alias to "pagealias"
Give that user permission to edit the page you created (in permissions tab "Additional editors")
Edit the page you just created, change the owner to testuser
Logout
Login as testuser
Content Manager - you will see in the Content Manager page list that the test page has alias "pagealias"
Edit the page
Submit the changes
You will see in the Content Manager page list that the page alias has changed from "pagealias" to "test"

I will raise this with Dev Team.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Edit by non-admin user overwrites page alias (CMSMS 2.2.

Post by paulbaker »

paulbaker wrote:I will raise this with Dev Team.
This has been acknowledged and is being worked on. Watch this space...
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Edit by non-admin user overwrites page alias (CMSMS 2.2.

Post by paulbaker »

paulbaker wrote:Watch this space...
Version 2.2.5 has now been released:
https://www.cmsmadesimple.org/downloads/cmsms/

I have upgraded a site and confirm this bug has been removed. In my test plan, the page alias stays as "pagealias" when the page is edited by the testuser.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Bash Gordon

Re: Edit by non-admin user overwrites page alias (CMSMS 2.2.

Post by Bash Gordon »

Yes, the problem appears to be solved. I hope finally this time.

Thank you! Best,
Bash
Locked

Return to “CMSMS Core”