Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Page Parent not updating

UserPost

4:04 pm
August 21, 2009


3gdave

Member

posts 7

1

Hi!

First things first, thanks for developing RS. So far, I've had a good experience playing around with it. Have a couple issues, however…

Details: Running current WP (2.8.4) + Role Scoper (1.0.8). Have an admin account that is [WP-Administrator] group, plus a couple test user accounts that are an RS-created subscriber group to view private pages & content on my site.

The main issue is that I have a number of private pages on my blog (actually using WP much more like a CMS for a private "members" area for my customers). I imported those pages from another wordpress development server. They loaded in just fine, and Role Scoper worked perfectly for allowing subscribed users in to view content and keeping non-members from viewing anything.

However, I went in to make a change to one of my sub pages, and have discovered that when I set the "parent" value of a sub-page, it will not save the updated value. For instance, I have an "About" page with children "Meet the Team" and "Contact Us". I made an edit to "Meet the Team" and selected "About" in the Parent Attribute drop-down. Pressed update, and the Parent Attribute had been set to Main Page (no parent).

I tried to disable Role Scoper, but realized that WP still has a glitch that private pages don't show up in the non Role Scoper mode when selecting parent / child relationships (even though the relationships are set in the database and appear on the list of pages).

This is a very small but absolutely critical piece for my new site. I'd really appreciate your input in to what I need to do to get this working again. I feel like I've dug myself a little too deep and am contemplating a complete tear down & re-install of everything, but that'll cost me 20+ hours of headaches, all for a problem that might repeat itself.

Thanks for whatever suggestions you can provide in advance.

Dave

11:40 am
August 24, 2009


3gdave

Member

posts 7

2

Just a quick bump here to see if there are any thoughts on this error?

I've disabled any new plugins that I've acquired, thinking perhaps there was a compatability issue… Nothing was resolved.

Looking forward to any ideas on a workaround! Thanks.

12:47 pm
August 24, 2009


Kevin

Admin

posts 2402

3

So the pages which fail to be saved as Parent have visibility set to private? Are you able to set public pages as parent with RS activated?

12:51 pm
August 24, 2009


Kevin

Admin

posts 2402

4

Are you logged in as an Administrator when this error occurs? As you noted, WordPress' default exclusion of private pages from the Parent dropdown is why RS filters for an Administrator at all.

1:10 pm
August 24, 2009


3gdave

Member

posts 7

5

Kevin, thanks for your response!

I just tried a test parent / child on a couple new pages that I set to public. Worked just fine.

Yes, I'm logged in as an Administrator.

So you think the issue might be related to my acct not having sufficient admin privs? Let me look in to that a little further - maybe make another admin acct and see if I can get this to work.

Thanks for pointing me in at least 1 direction!

Dave

1:28 pm
August 24, 2009


Kevin

Admin

posts 2402

6

3gdave said:

I just tried a test parent / child on a couple new pages that I set to public. Worked just fine.

Yes, I'm logged in as an Administrator.

So you think the issue might be related to my acct not having sufficient admin privs?


No, I'm wondering if WordPress itself is filtering out the selected parent due to its private status, and without regard to the logged user's capabilities. The problem with Administrators is that Role Scoper does not normally filter the get_pages output for them, so limitations imposed by WP are more likely to pass through unaltered. But I can't confirm these guesses because so far private parents are stored just fine on my install.

It would be helpful to me to know if you are able to store a private page as Parent when logged in as an Editor.

2:34 pm
August 24, 2009


3gdave

Member

posts 7

7

Kevin,

Okay, thanks to your direction, I went ahead and created a new user and set them as an administrator, and then went in to Roles and set them as an administrator through RS. Turns out, this did the trick, and I was able to set the page permissions.

I think the problem came in when I imported the database and mapped the user… Even though my admin acct was an "administrator" I think somehow it wasn't correctly associated within Role Scoper. Even tooling around for a few minutes I ran in to "You do not have sufficient permissions…" errors on the existing admin acct.

Looks like everything is working now. Thanks for the suggestion on where the issue lay. I'm just going to use this new admin acct from here on out, and if I do any more migration I'll be sure to pay attention to the user mapping.

3:14 pm
September 1, 2009


3gdave

Member

posts 7

8

Hi Kevin,

Hate to return for this, but I've come back to this issue again… Not sure exactly where the error is, but I've done a few tests to see what happens, and hopefully I can get your input on the issue.

I've created an entirely new instance of Wordpress. All I installed was my theme (Atahualpa - a pretty robust theme but in itself shouldn't be an issue I think) and the Role Scoper plugin. Running WP 2.8.4 (latest release) and Role Scoper 1.0.8 (latest release)

Here's what I have tried…

Created a page to be the parent. Set it to "private". Then created a page to be the child. Set it to "private", and it automatically reverted the parent from Page 1 (parent) to Main Page (no parent; default).This is my issue.

However, I can get the private pages to connect if I do the following:

Set the child to public (Main page as parent). Set the parent to public. Go back in to the child (while the parent is still public) and set the parent relationship and set the page to private. I can make all the changes I want.

Then I go back in to the parent, and set it to private. The relationship is retained, and both pages are now private. This works.

However, if I want to make an edit to a child while the parent is still private, the parent-child relationship is broken again until I reset the parent to public.

— Sorry for this convoluted explanation, but I think this is critical to understanding the error that's occurring here.

In summary - I cannot get a child to retain it's parent relationship while the parent is private. Do you have any suggestions on why this might be? Are there roles I need to look at, in either a user-by-user basis, group assignment, page roles and / or restrictions? General settings?

I really appreciate any insight you can provide.

Thanks,

Dave

4:34 pm
September 2, 2009


3gdave

Member

posts 7

9

Coming back to see if you've gotten a chance to review this error. Really confusing me.

I just tried to patch WP to work around this using the patch found at the trac site: http://core.trac.wordpress.org/ticket/8592 but didn't seem to make a difference. If the parent is private, my children won't retain their parent attribute assignment.

Is there a way to make sure that my admin is an absolute be-all-end-all super administrator with complete priviliges to everything? I'm wondering if perhaps my admin account is missing some permission buried in the various role assignment screens.

Thanks again in advance!!

Dave

1:07 pm
September 3, 2009


Kevin

Admin

posts 2402

10

3gdave said:

Coming back to see if you've gotten a chance to review this error. Really confusing me.

Dave


No, I haven't. I'm very interested in this issue but need to complete some other commitments first.

1:33 pm
September 3, 2009


3gdave

Member

posts 7

11

Kevin,

Thanks, no problem, I know this is a free product that you're supporting so thanks for any help you can provide…

I also stumbled across this error: http://wordpress.org/support/topic/240079 which is IDENTICAL to what I'm experiencing, which is why I was hoping that patch would have worked. 

I'm pretty well stumped!

3:52 pm
October 12, 2009


Kevin

Admin

posts 2402

12

3gdave said:

In summary - I cannot get a child to retain it's parent relationship while the parent is private. Do you have any suggestions on why this might be? Are there roles I need to look at, in either a user-by-user basis, group assignment, page roles and / or restrictions? General settings?


No, it's a legitimate bug that I just reproduced locally. I'll have a fix for it in the upcoming release. Thanks for all your detailed feedback and patience on this issue.

5:41 am
October 13, 2009


Kevin

Admin

posts 2402

13

Kevin said:

3gdave said:

In summary - I cannot get a child to retain it's parent relationship while the parent is private. Do you have any suggestions on why this might be? Are there roles I need to look at, in either a user-by-user basis, group assignment, page roles and / or restrictions? General settings?


No, it's a legitimate bug that I just reproduced locally. I'll have a fix for it in the upcoming release. Thanks for all your detailed feedback and patience on this issue.


Actually, it's a longstanding WordPress bug that I wasn't aware of! For non-administrators, Role Scoper already filters the Page Parent dropdown to include all pages they can edit (or for which they have the create_child_pages capability via Page Associate role). But I had disabled that filtering for logged administrators, leaving the Page Parent display at WP core behavior. Due to the WP core's issue with non-published parents, RS filtering will be helpful to Administrators too. To enable it (forcing all pages to be available as Page Parent for Administrators), edit role-scoper_main.php as follows:

change:

if ( $this->is_front() || ! $is_administrator ) {
  require_once('query-interceptor_rs.php');
  ...
}

to:

//if ( $this->is_front() || ! $is_administrator ) {
  require_once('query-interceptor_rs.php');
  ...
//}

I will also make this change in the upcoming RS 1.1 release.


About the Agapetry forum

Currently Online:

16 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1186

Posts: 5409

Members:

There are 1176 members

There are 1 guests


Kevin has made 2402 posts

Top Posters:

metal450 - 159

Ragnar - 105

YikYak - 70

whiteorb - 44

Daisy - 35

Administrator: Kevin | Moderators: Kevin