Coping page in sitemap error message

1 confirmed 0 invalid Browser Info Environment
I've been looking all over the forum to an answer for this particular bug and couldn't find one, so I ended up troubleshooting it myself. I've got so far, but now am really stumped. The good news is that I can easily replicate the conditions that generate the error. Here goes:

1) Create a page in the sitemap.
2) Click "Set permissions" and change first drop down to "manually". Add any relevant user/group to the page.
3) Save.
4) Try dragging and copying the page into the parent folder.

The attached "error_1" message would appear. So I edited the concrete/modules/page.php file to manually set the "uID" value to 0. This now resolved that issue, but another error appears ("error_2"). After the error is closed, C5 generates a duplicate page (with a different cID) and the same name. When this duplicate page is deleted, it also deletes the original page. Eeeek!

I've found that if the permissions are not set to "manual", the copy process works ok.

This issue only affects users who are not the super admin.

I've tested it on Firefox and Chrome.

Any ideas?
2 Attachments
jb1
View Replies: View Best Answer
andrew replied on at Reply
andrew
I'm working on a lot of permissions bug fixes today in 5.4.1. If I can reproduce this I'll post the fix and make sure it makes its way in.
andrew replied on at Best Answer Reply
andrew
Should be fixed in 5.4.1. Here's a fix you can apply to your own site.

1. Open concrete/models/page.php
2. Find line 1250
3. Change this

$q = "select cID, gID, ctID from PagePermissionPageTypes where cID = '{$this->cID}'";

To this:

$q = "select cID, gID, uID, ctID from PagePermissionPageTypes where cID = '{$this->cID}'";

That should do it. We were never retrieving uID so it was trying to insert a null.
jb1 replied on at Reply
jb1
Hi Andrew,
Thanks for your feedback. I had actually tried the same thing. But the problem mentioned in the original post is that ANOTHER error message appears after the first fix is applied. See the second error screenshot on the original post.

Please see if you can replicate this.

It only occurs when a page has "manual" permissions set.
andrew replied on at Reply
andrew
I saw that error. I could not replicate it. But I am working on 5.4.1 at the moment which has had some fixes applied in this area.

concrete5 Environment Information

# PHP Version
5.2.10

# Server Software
Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

# Server API
cgi

# Loaded Extensions
bcmath, calendar, cgi, ctype, curl, date, dbase, dom, filter, ftp, gd, hash, iconv, imap, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, openssl, pcre, posix, pspell, Reflection, session, SimpleXML, soap, sockets, SPL, standard, tidy, tokenizer, xml, xmlreader, xmlwriter, zlib.

# Limits
log_errors_max_len - 1024
max_execution_time - 30
max_input_nesting_level - 64
max_input_time - -1
memory_limit - 128M
post_max_size - 128M
safe_mode - Off
safe_mode_exec_dir - /usr/local/php/bin
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 128M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
pcre.backtrack_limit - 100000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH

Browser User-Agent String

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Safari/533.4