I ran into a problem where anonymous users would always get an Access Denied screen when viewing a panel that either did not set access rules, or even when Anonymous access was checked.

After digging around, I created this patch that fixed the problem, but it seems like an issue that other people would have reported by now as well so I'm not sure if its just for my environment although that seems very unlikely.

In panels_page.write.inc line 141 it's running implode(',', (array) $value); to create the string to save in the database, but later on in panels_page.read.inc, it is running explode(', ', $page->access) to re-create that value. There is an extra space after the comma on the explode statement which is making it fail to explode on the comma properly (there is no space after the comma in the DB).

I believe this patch needs to be committed, but it would also be good to know if others are experiencing the same problem and if there is something I am missing here that should be making it work as it is.

Thanks!

CommentFileSizeAuthor
panels_page_access.patch2.05 KBsarvab

Comments

JennySmith’s picture

I'm experiencing the same problem.

sdboyer’s picture

Thanks for the patch, Sarva. Yeah, this is an known issue, embarassingly so - I think Doug Green first reported it to me within a week or two of the alpha2 Panels release. Turns out the roots of it are actually pretty deep in to the system. I've waffled a bit on the solution, but I'm going to take your patch and make the necessary additions to the .install files, and backport this to D5 as well (where it's an issue in -dev, because I backported the fetcher system that made implosion explicit and necessary).

Anyway. Committed, with my additions.

sdboyer’s picture

Status: Needs review » Fixed
sdboyer’s picture

So I actually chose to go the other way on this, for a two reasons:

1) Because the ', '-delimited format is the one that FAPI expects, or at least other wrappers around FAPI within Panels do, and it burps (see #351720) when it's not in that format.
2) That format's also the one that's used for other access fields, such as those in panes, so I'm going to stick with what works.

So, patch reverted, etc., but the effect is still the same: fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

surgeonbor’s picture

Sorry, one question: I'm using Panels 6.x-2.0-alpha3 and having the problem described above. Should I use Sarva's patch until the next Panels 2 release? Or will the patch break other things (as I think you suggested in comment #4)?

socialnicheguru’s picture

I am having the same issue.

Witch’s picture

same problem here. subscribe