Page 1 of 1

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

Posted: Tue Sep 12, 2017 9:47 am
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

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

Posted: Tue Sep 12, 2017 12:32 pm
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
----------------------------------------------

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

Posted: Mon Nov 27, 2017 12:21 pm
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

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

Posted: Tue Nov 28, 2017 7:34 pm
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?

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

Posted: Wed Nov 29, 2017 12:46 pm
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

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

Posted: Wed Nov 29, 2017 6:07 pm
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.

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

Posted: Tue Dec 05, 2017 7:57 pm
by paulbaker
paulbaker wrote:I will raise this with Dev Team.
This has been acknowledged and is being worked on. Watch this space...

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

Posted: Tue Dec 19, 2017 3:42 pm
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.

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

Posted: Wed Dec 20, 2017 9:37 am
by Bash Gordon
Yes, the problem appears to be solved. I hope finally this time.

Thank you! Best,
Bash