I have last D7 and just have installed Panels and CTools, because Panels and views required CTools.

Then I have finish created a front page with flexible layout, but when I should edit this layout and add content or change settings I got this error below:

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /MMFS/panels/ajax/editor/layout/new/settings/center
StatusText: Forbidden
ResponseText: 
Access denied | MMFS - Miss & Mister France Sourds
@import url("/MMFS/modules/system/system.base.css?m27xkn");
@import url("/MMFS/modules/system/system.menus.css?m27xkn");
@import url("/MMFS/modules/system/system.messages.css?m27xkn");
@import url("/MMFS/modules/system/system.theme.css?m27xkn");
@import url("/MMFS/modules/aggregator/aggregator.css?m27xkn");
@import url("/MMFS/modules/comment/comment.css?m27xkn");
@import url("/MMFS/modules/field/theme/field.css?m27xkn");
@import url("/MMFS/sites/all/modules/google_analytics_reports/google_analytics_reports/google_analytics_reports.css?m27xkn");
@import url("/MMFS/modules/node/node.css?m27xkn");
@import url("/MMFS/modules/poll/poll.css?m27xkn");
@import url("/MMFS/modules/search/search.css?m27xkn");
@import url("/MMFS/modules/user/user.css?m27xkn");
@import url("/MMFS/sites/all/modules/views/css/views.css?m27xkn");
@import url("/MMFS/sites/all/modules/ctools/css/ctools.css?m27xkn");
@import url("/MMFS/sites/all/modules/panels/css/panels.css?m27xkn");
@import url("/MMFS/modules/toolbar/toolbar.css?m27xkn");
@import url("/MMFS/modules/shortcut/shortcut.css?m27xkn");
@import url("/MMFS/themes/seven/reset.css?m27xkn");
@import url("/MMFS/themes/seven/style.css?m27xkn");
Skip to main content
Home
Hello admin
Log out
Administrative toolbarDashboard (View and customize your dashboard.)
Content (Administer content and comments.)
Structure (Administer blocks, content types, menus, etc.)
Appearance (Select and configure your themes.)
People (Manage user accounts, roles, and permissions.)
Modules (Extend site functionality.)
Configuration (Administer settings.)
Reports (View reports, updates, and errors.)
Advanced help
Help (Reference for usage, configuration, and modules.)
Hide shortcuts      
Add content
Find content
Edit shortcuts  
You are hereHome              Access denied
Add to Default shortcuts      
You are not authorized to access this page.  
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

truls1502’s picture

Issue tags: +panels
Devin Carlson’s picture

I'm also getting this error while using the layout designer and Panelizer.

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /en/panels/ajax/editor/layout/new/add/main/right
StatusText: Forbidden
ResponseText: 
Access Denied
merlinofchaos’s picture

Issue tags: -panels, -AJAX HTTP error, -ajax http error 403, -AJAX HTTP error occurred, -StatusText: Forbidden

Please don't abuse tags.

The text says: "Do NOT use tags for adding random keywords or duplicating any other fields"

merlinofchaos’s picture

This is most likely a Panels issue. This is very probably related to not being a top level domain, i.e, the site is at http://www.example.com/drupal -- and somehwere in the AJAX a URL is being mistranslated.

swentel’s picture

The only difference that I see is the URL:

panels/ajax/editor/layout/new/settings/center
vs mine (with all latest version)
panels/ajax/editor/layout/builder-new/settings/center

Edit: even If I remove the 'builder-' part, it still keeps working fine here.
Edit: that builder- is since a long time, so really no idea, really tempated to mark 'Can't reproduce'

swentel’s picture

ewcy’s picture

Same issue happening.

In fact my situation is a fresh install of Drupal 7.12 running on Mac OS X Lion (with Mac's internal apache and php, and a self installed MySQL).

with these modules installed:
advanced_help-7.x-1.0.tar.gz
ctools-7.x-1.0.tar.gz
panels-7.x-3.2.tar.gz
views-7.x-3.3.tar.gz

The following error happen whenever I try to use the 'builders' layout trying to add more region (those "add to left" links in the builder)

Error is as follows:
An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /~ewcy/drupal/panels/ajax/editor/layout/new/add/main
StatusText: Forbidden
ResponseText:
Access denied | Mah Site
@import url("http://localhost/~ewcy/drupal/modules/system/system.base.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/system/system.menus.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/system/system.messages.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/system/system.theme.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/misc/ui/jquery.ui.core.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/misc/ui/jquery.ui.theme.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/overlay/overlay-parent.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/contextual/contextual.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/comment/comment.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/field/theme/field.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/node/node.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/search/search.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/user/user.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/sites/all/modules/views/css/views.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/sites/all/modules/ctools/css/ctools.css?m2...");
@import url("http://localhost/~ewcy/drupal/sites/all/modules/panels/css/panels.css?m2...");
@import url("http://localhost/~ewcy/drupal/modules/shortcut/shortcut.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/modules/toolbar/toolbar.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/themes/bartik/css/layout.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/themes/bartik/css/style.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/themes/bartik/css/colors.css?m2iurl");
@import url("http://localhost/~ewcy/drupal/themes/bartik/css/print.css?m2iurl");
Skip to main content
Options for the administrative overlayIf you have problems accessing administrative pages on this site, disable the overlay on your profile page. Dismiss this message.
Home
Hello admin
Log out
Administrative toolbarDashboard (View and customize your dashboard.)
Content (Administer content and comments.)
Structure (Administer blocks, content types, menus, etc.)
Appearance (Select and configure your themes.)
People (Manage user accounts, roles, and permissions.)
Modules (Extend site functionality.)
Configuration (Administer settings.)
Reports (View reports, updates, and errors.)
Advanced help
Help (Reference for usage, configuration, and modules.)
Hide shortcuts
Add content
Find content
Edit shortcuts
Mah Site
Main menuAbout us
Home
TestingPanel
Secondary menuMy account
Log out
You are hereHome
Configure block
Search form
Search
Navigation
List links
Edit menu
Configure block
Add content
Chaos Tools AJAX Demo
Access denied
You are not authorized to access this page.
Configure block
Powered by Drupal

I'm not sure if it relates to mod_rewrite, so I've attached the mod_rewrite lines from my .htaccess FYI as well:


RewriteEngine on
RewriteBase /~ewcy/drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]

# Serve gzip compressed CSS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]

# Serve gzip compressed JS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]

# Serve correct content types, and prevent mod_deflate double gzip.
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]


# Serve correct encoding type.
Header set Content-Encoding gzip
# Force proxies to cache gzipped & non-gzipped css/js files separately.
Header append Vary Accept-Encoding


I believe this is a problem of Panels.

marktheshark’s picture

Same here, cannot any change any content nor layout of a panel page due to 403 errors.

ofridagan’s picture

Same here, exactly!
Fresh install.

truls1502’s picture

Project: Chaos Tool Suite (ctools) » Panels
Version: 7.x-1.0 » 7.x-3.2
Priority: Normal » Major
FileSize
394.28 KB

Hello,

I have to move this issue, because we have tried on CTools, but it seems the errors messages are from Panels module, not CTools. So it needs to be fixed. I have got new error message, the same error from: #1055766: Undefined index: theme in panels_renderer_standard->render_layout(). Also the message was:

Notice: Undefined index: theme in panels_renderer_standard->render_layout() (line 384 of /home/signwo/public_html/problem/sites/all/modules/panels/plugins/display_renderers/panels_renderer_standard.class.php).
Notice: Undefined index: theme in panels_renderer_standard->render_layout() (line 384 of /home/signwo/public_html/problem/sites/all/modules/panels/plugins/display_renderers/panels_renderer_standard.class.php).

 

But I have created a new fersh D7.12 and have installed the modules as only CTools, Panels and Views.
To try find the solution to this problem, until now, I still get the errors, so I am trying doing this tutorial to explain where I got the error:
1. Login (http://www.signwo.com/problem/user)

2. Create a new panel. Click "Panel page" on (Administer > Structure > Panels).
3. Set the Administrative title to: Home
4. Click Edit on Machine name and set title: front_page
5. Seth the Path to: front (it should be http://www.signwo.com/problem/front)
6. Check the "Make this your home site page" checkbox.
7. Click 'Continue' at the bottom.

8. Choose the category to: Builders
9. Select: Flexible
10. Click 'Continue' at the bottom.

11. Check the "Disable Drupal blocks/regions"
12. Click 'Continue' at the bottom.

13. Click the "Show Layout designer" button.
14. In the Region menu, select "Region settings", and change the region title to "Left".
15. In the Row menu, select "Add region to right". Title this region "Right".
16. Use the slider bar to set the width to 80 on the left, 20 on the right.
17. Click Finish

18. Click the gear icon to the left (center - if you could not give this a name) pane.
19. Then click "Add content"
20. Under the 'Views' heading, you find and select the "frontpage"
21. Select the display to: Master
22. Click Continue.

23. Click Update and save.

As you saw the bold/strong text, the number 14 is where I am getting this error message below or you can take a look on the screenshot:

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /problem/panels/ajax/editor/layout/new/settings/center
StatusText: Forbidden
ResponseText: 
Access denied | Test Panels
@import url("http://www.signwo.com/problem/modules/system/system.base.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/system/system.menus.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/system/system.messages.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/system/system.theme.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/comment/comment.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/field/theme/field.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/node/node.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/search/search.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/user/user.css?m2wmcz");
@import url("http://www.signwo.com/problem/sites/all/modules/views/css/views.css?m2wmcz");
@import url("http://www.signwo.com/problem/sites/all/modules/ctools/css/ctools.css?m2wmcz");
@import url("http://www.signwo.com/problem/sites/all/modules/panels/css/panels.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/toolbar/toolbar.css?m2wmcz");
@import url("http://www.signwo.com/problem/modules/shortcut/shortcut.css?m2wmcz");
@import url("http://www.signwo.com/problem/themes/seven/reset.css?m2wmcz");
@import url("http://www.signwo.com/problem/themes/seven/style.css?m2wmcz");
Skip to main content
Home
Hello admin
Log out
Administrative toolbarDashboard (View and customize your dashboard.)
Content (Administer content and comments.)
Structure (Administer blocks, content types, menus, etc.)
Appearance (Select and configure your themes.)
People (Manage user accounts, roles, and permissions.)
Modules (Extend site functionality.)
Configuration (Administer settings.)
Reports (View reports, updates, and errors.)
Help (Reference for usage, configuration, and modules.)
Hide shortcuts      
Add content
Find content
Edit shortcuts  
You are hereHome              Access denied
Add to Default shortcuts      
You are not authorized to access this page.  

So, what can the reason be?

truls1502’s picture

I got it to works.

Only in Content-tab or in Summary-tab then click "Edit content".

But I am still getting the error when I am trying change the other layout than Flexible, then back to Flexible and updated other layout.

Then I should try click "Show Layout designer" button, there is where I just get the error message. But I still can configure, but only in content-tab, not in layout-tab. Mean there is some wrong coded in layout-tab and when someone trying create a new panel page.

Christoph Haas’s picture

I can confirm that. In "Panel layout" editing the AJAX error appears. But in "Panel content" it works well.

agagliardo’s picture

I too ran into the same error while using Panelizer but found if I put off adding columns, regions, rows etc until after saving under the "Layout" tab I can go back and make edits under "Content" and not get the error.

merlinofchaos’s picture

Man, this is a weird one. Still keeping an eye on it.

The last comment mentioned Panelizer, though that is a different circumstance than the original report. Hmm.

swentel’s picture

FileSize
1.18 KB

Attached is a patch which will log watchdog messages in case of an access denied. It *probably* happens somewhere in panels_ajax_router() (or at least, let's hope so). If you have an access denied now and then, could you apply this patch and see if you have an entry called 'panels_403' and report the details of the message here ? Thanks!

jboese’s picture

I also receive this error. I've tried to set a panel page's layout from one of the fixed layouts provided by Panels to the Flexible layout. While adding rows/regions/etc. to the flexible layout before saving, the error appears:

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /panels/ajax/editor/layout/new/add/main-row
StatusText: error
ResponseText:
Access denied | 96 Key

...etc.

nhck’s picture

Priority: Normal » Major

After the watchdog patch:

Type	panels_403
Date	Friday, May 11, 2012 - 00:12
User	service
Location	https://example.com/panels/ajax/editor/layout/new/add/main/right
Referrer	https://example.com/node/9/panel_layout
Message	cache is empty for new(args: Array ( [0] => add [1] => main [2] => right ) )
Severity	notice
Hostname	XX.XX.XXX.XXX
Operations

Course of action:

  • Create Panel
  • Open Panel
  • Choose "Panel layout"
  • Category Builders, Builders, Flexible, Next
  • Show layout designer
  • Click on "Column" and choose "Add row to top"
  • Inline Window appears, "loading"
  • Javascript alert() msg. appears. (http://pastebin.com/32d9nbLT)

Installed modules: http://pastebin.com/VcJatxRh

When I choose "Panel content" instead of "Panel layout" everything works fine. I noticed this difference in the paths:
"Panel layout":
https://example.com/test/panels/ajax/editor/layout/new/add/main
"Panel content":
https://example.com/test/panels/ajax/editor/layout/1/add/main

merlinofchaos’s picture

Priority: Major » Normal

AHH!

Okay, I think we've been misunderstanding all along.

I don't think I'd ever realized that the layout designer would be accessible from the "Edit layout" tab, only the "edit content" tab.

Is there anyone getting this error from a point other than actually trying to change the layout? If so, please let me know.

Now that I understand the bug, it's going to be a bit difficult to fix. Luckily, it's also not that big of a deal since you can go change your layout from the edit content tab which is what was always intended.

TommyChris’s picture

Priority: Major » Normal

I have this error also.

If I go through Edit content, the layout designer works, if through Edit layout, it procedures the AJAX error (like above).

cehfisher’s picture

I am having the same issue. I have the latest Panels and CTools modules, but get errors when I use the layout designer using the "panel layout" tab. It seems to work when I get the editor through the "panel content" tab. Very odd.

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /panels/ajax/editor/layout/new/add/main-row
StatusText: Forbidden
ResponseText:
Access denied

likewhoa’s picture

Is there anyone getting this error from a point other than actually trying to change the layout?

nowhere but in the "panel layout" tab, users can get to "panel layout designer" in the "panel content" tab as well. This with -dev modules + core.

damban’s picture

Using Panel only for 2 days, so limited data gathering. However on D7.14 and Panels 7.x-3.2 I have so far nly seen this long error after clicking on the "Show layout designer" button on panel_layout page.

edwu’s picture

subscribing.

Mile23’s picture

No need to add a 'subscribing' comment. Click the 'follow' button at the top of the issue page.

I see this error with Drupal 7.14, cTools/Page Manager 7.x-1.0 and Panels 7.x-3.2.

If I look at my variant and click on Summary tab, I see a 'Change Layout' link. This takes me to the Layout tab, so there's no difference between editing on the layout tab and the 'change layout' link as far as I can tell. At least: The error happens either way.

To make the error happen: On the Layout tab, change to Category: Builder. Select Flexible. Continue. Click Show Layout Designer. Choose to add any row or column from any of the Canvas, Column, or Row links. The editor tries to open, but you end up with this:

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /panels/ajax/editor/layout/new/add/canvas
StatusText: Forbidden
ResponseText: 
Access denied | Linden Endowment for the Arts
Skip to main content
Home
Hello Administrator
Log out
Administrative toolbarDashboard (View and customize your dashboard.)
Content (Administer content and comments.)
Structure (Administer blocks, content types, menus, etc.)
Appearance (Select and configure your themes.)
People (Manage user accounts, roles, and permissions.)
Modules (Extend site functionality.)
Configuration (Administer settings.)
Reports (View reports, updates, and errors.)
Help (Reference for usage, configuration, and modules.)
Hide shortcuts      
Add content
Find content
Cron
Performance
Maintenance mode
Backup and Migrate
Edit shortcuts  
You are hereHome              Access denied
Add to Default shortcuts      
You are not authorized to access this page.

I noticed that if you turn off caching for CSS you end up with a million lines of this, in addition to the above:

@import url("http://localhost:8888/modules/system/system.base.css?m5ugku");
@import url("http://localhost:8888/modules/system/system.menus.css?m5ugku");
@import url("http://localhost:8888/modules/system/system.messages.css?m5ugku");
@import url("http://localhost:8888/modules/system/system.theme.css?m5ugku");
@import url("http://localhost:8888/modules/aggregator/aggregator.css?m5ugku");

Also, after dismissing this error dialog, I usually end up with a JavaScript dialog in my DOM which I have to dismiss by clicking 'close.'

Summit’s picture

Hi,
I come from panelizer. Latest version of panelizer, ctools and panels.
Having this same bug when trying to select the Context / Layout / Content of a teaser of a nodetype which is panelized.
Error:

You are not authorized to access this page.

I am logged in as administrator...so not good...Looking forward to the solution!

Greetings, Martijn

ligongx’s picture

I got same permission issue trying to edit builders - flexible on Drupal 7.14. The way I got around is to go to Panels Dashboard, create new Custom Layout, then edit layout the way you want. In your panel variant, simply pick the custom layout just created, no need to use the builders.

robcarr’s picture

Had the same issue using the 'Builders' to change the layout of a Panel (AJAX access-related errors). #26 was the only work around for me.

passengeraleph’s picture

Myself I'm getting the error when I'm trying to add custom content and I can change the layout just fine. The way I bypass it is to create a block outside of panels and add it as a custom block.

passengeraleph’s picture

also, it's definitely subdomain related. I run the exact same site in a domain and a subdomain for testing purposes and I'm getting the error only in the subdomain.

Nevermind I just received it in the main domain as well.

sprhawk’s picture

I encountered the same problem too.

I used vagrant/puppet to set up a dev env in VM, with drush installing the initial site.

I found directly access to the css urls succeeded. Then I realized that other problems are raised due to the directory permissions to the drupal/sites/default/files (is ctools/css permissons). Then I modified the scripts in which i executed a sudo chown -R www-data:www-data drupal/sites/default/files, then all problems are resolved !

BenjaminRH’s picture

I had this problem too, until I realized that you can work around it by selecting the "Show layout designer" from the "Panel content" tab.

ravindersinghsond’s picture

Hi Sprhawk (#30),

I m new to Drupal and in the process of creating a simple website. I have...........

Drupal 7.15
Panels 7.x-3.3
ctools 7.x-1.2
Danland 7.x-1.0 (theme)

I m also getting same error message when trying to create a custom panel. I am using windows 2003 enterprise edition sp1 and i have given full control permission over "drupal/sites/default/files" also i am logged in to the OS as Administrator. But still getting the same error. Any Suggestions?

wspademan’s picture

I get this error message in my own custom autocomplete field for a very specific set of input data. Anything matching the following regular expression produces the error message. Nothing else seems to produce an error:

.*/?.([^\.]|\..)

Some examples that produce the error:

  • .a
  • ..a
  • ...
  • whatever/.a
  • whatever/..a
  • whatever/...

Some examples that don't produce an error:

  • whatever.a
  • whatever..a
  • whatever...a
  • whatever....a
  • what//////ever.a

I also notice that the string argument to my autocomplete form function has the following anomalies:

  • "." (period) and "/" (slash) are never included in the string, regardless of where they appear. For example, if I type "/.a" in the autocomplete field, the function will be called three times, with the string argument equal to "", "", and "a".
  • "," (comma) is included, but does not trigger a call to the function. For example, if I type ",,,,,a" in the autocomplete field, the whole string gets passed, but not until I type the "a".
monsoon’s picture

I have received this error twice, and now while working with Features module. When you go to

Structure > Features >
and click on 'Edit Components'

I have to select Content type: node
and As soon as I check on any of the check boxes of content types available on my website, I get similar error:

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /system/ajax
StatusText: Forbidden
ResponseText:

I am logged in as an Administrator, so have all the rights.

Thanks, hoping to find any work around soon. I am encountering this error on two different areas of the website, and it prevents me from doing any work further.

Thanks,

merlinofchaos’s picture

#34: Unfortunately, this issue is specific to panels layout editing only; your problem is with an entirely different module, so posting here won't help you.

deanflory’s picture

Anyone having lots of AJAX issue might want to try disabling the jQuery_Update module, worked for me. Just spreading the info, unsure if it's related to this issue.

BChandran’s picture

Wow deanflory! That was a good temporary fix. I am getting the AJAX 403 error in a few cases and won't let me change some things in Structure. Disable jQuery_Update module, change things under Structure and no error. Then I enable jQuery_Update module back. Thanks for the suggestion.

deanflory’s picture

An alternative that I'm guessing is the next evolution of the jquery update module is a semi-new module called jqmulti, might help utilize multiple versions of jquery simultaneously:

http://drupal.org/project/jqmulti

deanflory’s picture

Issue summary: View changes

I added /MMFS/ which I removed before, but need to have it there if there is a baseurl issue.

lsolesen’s picture

Could you please try with the latest dev and update the version accordingly. Seems to have a duplicate also #1668324: An AJAX HTTP error occurred. PHP 5.4

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)
ryanc’s picture

A similar issue was solved for me by changing from the built-in PHP web server (-S) with a slightly customised router.php, to the drush rs built-in web server. Which makes me think it may be an .htaccess setup issue for others.

lsolesen’s picture

Status: Postponed (maintainer needs more info) » Fixed

Closing for inactivity. Please reopen with exact steps to reproduce on latest dev, if you still have the issue.

Status: Fixed » Closed (fixed)

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

Victor Lourng’s picture

I still am having this issue on both 7.31 stable (dev environment) and 7.x-dev (clean install.)

Screencast here: http://quick.as/oe1sj5e

Here steps I used to reproduce this on 7.x-dev using a clean default install and sqlite. I only installed + enabled panels and ctools (a dependency) -

  1. Create Content
  2. Panel
  3. Flexible
  4. Select "In-Place Editor"
  5. Save
  6. "Panel Content"
  7. "Show layout designer"
  8. Canvas dropdown > "Add Column Left"
Victor Lourng’s picture

Version: 7.x-3.2 » 7.x-3.x-dev
Status: Closed (fixed) » Active
macrigor’s picture

My solution to this problem was check the modication i did a couple months ago to .htaccess file. I needed clean pagination for my sites at Greysaber.com and boom20.com. I tried the clean pager module but was having a major problems with it. So I set out to make my own taylor made solution with help of the community.

I found a solution modifying the theme_pager_link() function in my template.php file. See the solution provided a community member called Merc (along my minor modication) ...

function MyTheme_pager_link($variables) {
$text = $variables['text'];
$page_new = $variables['page_new'];
$element = $variables['element'];
$parameters = $variables['parameters'];
$attributes = $variables['attributes'];
// $page ="";

// ADDED BY MERC
// $new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)));

$page = isset($_GET['page']) ? $_GET['page'] : '';
if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) {
$parameters['page'] = $new_page;
}

$query = array();
if (count($parameters)) {
$query = drupal_get_query_parameters($parameters, array());
}
if ($query_pager = pager_get_query_parameters()) {
$query = array_merge($query, $query_pager);
}

// Set each pager link title
if (!isset($attributes['title'])) {
static $titles = NULL;
if (!isset($titles)) {
$titles = array(
t('« first') => t('Go to first page'),
t('‹ previous') => t('Go to previous page'),
t('next ›') => t('Go to next page'),
t('last »') => t('Go to last page'),
);
}
if (isset($titles[$text])) {
$attributes['title'] = $titles[$text];
}
elseif (is_numeric($text)) {
$attributes['title'] = t('Go to page @number', array('@number' => $text));
}
}

$original_text = $text;

// ADDED BY MERC
$q = $_GET['q'];
//$q = preg_replace('/(.)\/page-(.*)/','$1',$q);
$homepage_replace_node = "";

if($q=="node"){
$isFrontPage = "yes";
$q = $homepage_replace_node;
}

else {
$isFrontPage = "no";
/* this is where you pull the alias path instead */
$q=drupal_get_path_alias($q);
}

/* this should be a word relevant to your site content
it will replace the word "node" in the pager urls */

if ($new_page && $isFrontPage=="yes") $q = 'page/' . $new_page ;
if ($new_page && $isFrontPage=="no") $q = $q . '/page/' . $new_page ;

// Pagination with rel=“next” and rel=“prev”. Does not support well multiple
// pagers on the same page - it will create relnext and relprev links
// in header for that case only for the first pager that is rendered.
static $rel_prev = FALSE, $rel_next = FALSE;
if (!$rel_prev && $original_text == t('‹ previous')) {
$rel_prev = TRUE;
drupal_add_html_head_link(array('rel' => 'prev', 'href' => url($q, array('absolute' => TRUE))));
}
if (!$rel_next && $original_text == t('next ›')) {
$rel_next = TRUE;
drupal_add_html_head_link(array('rel' => 'next', 'href' => url($q, array('absolute' => TRUE))));
}

if($q==$homepage_replace_node)
return "".$text."";
return l($text, $q, $attributes, count($query) ? implode('&', $query) : NULL);

}

.......
Then the second modification was made to my .htaccess file by including to new rewrite rules

RewriteRule (.*)/page/(.*)$ ?q=$1&page=$2
RewriteRule ^page/(.*)$ ?q=node/&page=$1

Using these two snippets i've managed to make taxonomy links and and my frontpage pager links clean.

Buttttt... it turns out the rewrite rules are messing with ajax in views resulting in the 403 and 200 errors. For me my solution is comment them out whenever i need to modify a view that uses ajax.

Hopefully the solutions to both clean pagination and stopping the 403 errors in views (An AJAX HTTP error occurred.
HTTP Result Code: 403) help someone else. This drupal community has given alot to me over the years. A small payback.

kenorb’s picture

Same here happening when trying to change any settings of a pane (CSS Properties or even Edit). The AJAX popup says: You are not authorized to access this page.

This is fairly simple installation of Drupal. Clearing caches, cc, truncating tables manually, rr, exporting into features, re-installing panels didn't help.

Failing AJAX URL: http://localhost/panels/ajax/editor/pane-css/panel_context%3Apage-homepa...

What is happening, it seems when cache entry is corrupted, panels returns access denied (even for admin) as per this code in panels_ajax_router():

  $cache = panels_edit_cache_get($cache_key);
  if (empty($cache)) {
    return MENU_ACCESS_DENIED;
  }

When commented out `MENU_ACCESS_DENIED`, the response is longer and it's:

[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"foo_subtheme","theme_token":"a05vHw50N0aL7yeSwykWOisp7cbBMk6ZEszh5XIUgmM"},"jquery_ajax_load":{"trigger":".jquery_ajax_load\r","target":"#jquery_ajax_load_target","toggle":1,"animation":1,"base_path":"\/","module_path":"sites\/all\/modules\/contrib\/jquery_ajax_load","site_name":"Digital foo"}},"merge":true},{"command":"modal_display","title":"Error","output":"Invalid pane id."}][{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"foo_subtheme","theme_token":"a05vHw50N0aL7yeSwykWOisp7cbBMk6ZEszh5XIUgmM"},"jquery_ajax_load":{"trigger":".jquery_ajax_load\r","target":"#jquery_ajax_load_target","toggle":1,"animation":1,"base_path":"\/","module_path":"sites\/all\/modules\/contrib\/jquery_ajax_load","site_name":"Digital foo"},"urlIsAjaxTrusted":{"\/panels\/ajax\/editor\/pane-css\/panel_context%3Apage-homepage%3A%3Apage_homepage__panel%3A%3A%3A%3A\/new-80d3d68a-da4b-4f7b-8cd8-0482e79040d8":true}},"merge":true},{"command":"modal_display","title":"Configure CSS on ","output":"\u003Cform action=\u0022\/panels\/ajax\/editor\/pane-css\/panel_context%3Apage-homepage%3A%3Apage_homepage__panel%3A%3A%3A%3A\/new-80d3d68a-da4b-4f7b-8cd8-0482e79040d8\u0022 method=\u0022post\u0022 id=\u0022panels-edit-configure-pane-css-form\u0022 accept-charset=\u0022UTF-8\u0022\u003E\u003Cdiv\u003E\u003Cdiv class=\u0022form-item form-item-css-id form-type-textfield form-group\u0022\u003E \u003Clabel class=\u0022control-label\u0022 for=\u0022edit-css-id\u0022\u003ECSS ID \u003C\/label\u003E\n\u003Cinput class=\u0022form-control form-text\u0022 title=\u0022CSS ID to apply to this pane. This may be blank.\u0022 data-toggle=\u0022tooltip\u0022 type=\u0022text\u0022 id=\u0022edit-css-id\u0022 name=\u0022css_id\u0022 value=\u0022\u0022 size=\u002260\u0022 maxlength=\u0022128\u0022 \/\u003E\u003C\/div\u003E\u003Cdiv class=\u0022form-item form-item-css-class form-type-textfield form-group\u0022\u003E \u003Clabel class=\u0022control-label\u0022 for=\u0022edit-css-class\u0022\u003ECSS class \u003C\/label\u003E\n\u003Cinput class=\u0022form-control form-text\u0022 title=\u0022CSS class to apply to this pane. This may be blank.\u0022 data-toggle=\u0022tooltip\u0022 type=\u0022text\u0022 id=\u0022edit-css-class\u0022 name=\u0022css_class\u0022 value=\u0022\u0022 size=\u002260\u0022 maxlength=\u0022128\u0022 \/\u003E\u003C\/div\u003E\u003Cbutton type=\u0022submit\u0022 id=\u0022edit-next\u0022 name=\u0022op\u0022 value=\u0022Save\u0022 class=\u0022btn btn-success form-submit\u0022\u003ESave\u003C\/button\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022form_build_id\u0022 value=\u0022form-z6TbGiTPEHWoqSGeqmqx_OIoREbjHTl958tm1XDkYWI\u0022 \/\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022form_token\u0022 value=\u0022ukCy1T8dmJ5QIT2PPUDfh9iIkLyrSTosCdsyy9yQH4Q\u0022 \/\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022form_id\u0022 value=\u0022panels_edit_configure_pane_css_form\u0022 \/\u003E\n\u003C\/div\u003E\u003C\/form\u003E"}]

where JSON validation shows as invalid:

Error: Parse error on line 25:
...Invalid pane id."}][{ "command": "sett
----------------------^
Expecting 'EOF', '}', ',', ']', got '['

When the request comes from cache, the second part is removed. Secondly I had to disable Notices in Drupal, otherwise they show up in the response as well. It may say 'Invalid pane id.', but the panes are fine. It happens on all of panes (custom & views, etc.).

Tested version: 7.x-3.5 and latest dev.

--

I think my case is related to PHP builtin server, as I'm using it with .ht.router.php and it's reproducible on clean installation with panels and page_manager, when trying to edit some panes. However it works fine with Apache.

kenorb’s picture

truls1502’s picture

Status: Active » Closed (outdated)

I am going to close this ticket. Please re-open the ticket if you still have issue.

matman476’s picture

I'm experiencing similar issues as #47, specifically for any variant in "/node/%node/edit". Logged in as an administrator, utilizing version 7.x-3.6. For me the problem was found inside the "panels_ajax_router" function:

  $op = $renderer->get_panels_storage_op_for_ajax($method);
  if (!$cache->display->access($op)) {
    return MENU_ACCESS_DENIED;
  }

Commenting out the return allowed me to manipulate the page like you normally would. The AJAX request was sent to "http://localhost/panels/ajax/editor/select-content/panel_context:node_ed...", which returned:

[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"test","theme_token":"EgGkk9MBddDx5pEYr1sOs3yrMKrSf6EUzk3li4M1SdE"}},"merge":true},{"command":"alert","text":"You are not authorized to access this page."}]

I flushed caches, checked if I really did have all administrator permissions and rebuild them, deleted my .htaccess and cleared my tmp folders, but nothing worked.

matman476’s picture

Status: Closed (outdated) » Active
dsnopek’s picture

Status: Active » Closed (outdated)

I suspect the new comment here is really this issue: #2785915: Panels permissions update causes access denied on page manager pages defined in code

Please try out the patches there! Closing this for now, but you can always re-open later if that turns out to be a red herring.