This only occurs when selecting all rows (everything is fine with a single page) on the content administration page (using administrative Views module). After confirms the operation, I'm taken to an access denied page. Any hints as to what's going on would be appreciated.

CommentFileSizeAuthor
#13 views_export.txt14.77 KBgotcha41
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

infojunkie’s picture

* As an admin do you get the access denied page too?
* Are you using actions_permissions that comes with VBO to restrict usage of some actions?
* Does the Drupal log report anything that might be related?

I need to test admin_menu-6.x-3.x + Views 6.x-3.x + VBO 6.x-3.x to reproduce this. I'll try it some time this week.

Eidolon Night’s picture

* Yes, I'm logged in as user 1
* Nope, not using actions_permissions
* Log reports:

Type access denied
Date Tuesday, July 6, 2010 - 09:48
User Administrator
Location http:///batch?op=start&id=246
Referrer http:///admin/content/node
Message batch
Severity warning
Hostname
Operations

infojunkie’s picture

Thanks. Nothing much there except that the VBO path is admin/content/node (to override the core Drupal admin content page). I'll try to reproduce this with your setup.

Eidolon Night’s picture

Oh, I noticed too, we're still on Views 2, not 3 yet.

infojunkie’s picture

Version: 6.x-3.x-dev » 6.x-1.10-beta2
Status: Active » Postponed (maintainer needs more info)

VBO 6.x-1.10-beta2 and above support both Views 2.x and 3.x. Please try with this version and let me know if you still encounter the same problem.

gotcha41’s picture

I've got the exact same problem, it gives "access denied" after selecting all rows (of a content type). Batch deleting """all rows minus one""" works (e.g. only deleting 499 of 500 rows). I installed this module especially to delete all rows at once

gotcha41’s picture

in contrast, it DOES work when selecting the option "Invoke them directly". And then selecting all rows and deleting them for instance

To execute operations:
Invoke them directly
Use Batch API

but it is still not working when selecting "batch API"... (I use a localhost)

infojunkie’s picture

Version: 6.x-1.10-beta2 » 6.x-1.x-dev

@gotcha41, what version of VBO and Views are you using?

gotcha41’s picture

I am using VBO 6.x-1.10 and Views 6.x-2.12

infojunkie’s picture

Can you please try with the latest dev and let me know if this problem still exists?

gotcha41’s picture

I tried with the dev version and at first it showed 'access denied', several times later it showed the following error:

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:7:\"warning\";s:8:\"%message\";s:102:\"mysqli_query() [<a href=\'function.mysqli-query\'>function.mysqli-query</a>]: MySQL server has gone away\";s:5:\"%file\";s:75:\"C:\\Program Files\\wamp\\www\\drupal\\includes\\database.mysqli.inc\";s:5:\"%line\";i:114;}', 3, '', 'http://localhost/drupal/bulk_edit', 'http://localhost/drupal/bulk_edit', '127.0.0.1', 1308466267) in C:\Program Files\wamp\www\drupal\includes\database.mysqli.inc on line 134
Are you sure you want to perform Delete node on selected rows?

It only worked once with 'use batch API'. Later on, I tried with the same settings and it displayed the same error. I also have cck custom fields installed.

infojunkie’s picture

Status: Postponed (maintainer needs more info) » Active

* Does it happen with the stock VBO (admin/content/node2)?
* Is the module actions_permissions enabled?
* Are you logged in as admin?

Please attach the view export.

gotcha41’s picture

FileSize
14.77 KB

*what do you mean with stock VBO? the url 'admin/content/node2' shows the same page as 'admin/content/'
*actions_permissions is disabled
*logged in as admin

an export of the view is attached

infojunkie’s picture

Even though I cannot import this view, because I don't have the extra CCK fields, there's no immediate problem that I can see with your view.

I was asking about any stock VBO, for example 'admin/content'. Do you get "access denied" when you apply any action in this view as well?

I suspect you are witnessing unwanted interference from a 3rd party module. Specifically, a module that gets triggered upon modification or deletion of a node. You might want to think which modules might be causing this and remove them one by one until you get rid of the error.

gotcha41’s picture

Thanks for your reply. First of all, I can say that the url 'admin/content/node2' does work but only in the normal VBO version, not in VBO dev. That is why I couldn't find the 'admin/content/node2' in the dev version. So once again, the 'admin/content/node2' page works. I assume there is a problem with deleting many nodes (10000+) and this runs into an SQL timeout/ php_memory fill. The maximum number of nodes that I can delete is 500 (even with using batch API). My server has php_memory_limit set to 50MB.

I did some research and found that the module 'bulk delete' is designed to do this. I will use this one to delete the large quantity of nodes. For "smaller" operations, I'll use VBO.

Thank you very much for looking into this, I appreciate. I love the drupal community

infojunkie’s picture

Status: Active » Closed (cannot reproduce)

Thanks for your feedback.

hedac’s picture

I'm having access denied also if I want to delete more than 2000 rows more or les...
the problem is I need to delete only certain nodes based on filters by views... so I can't use bulk delete.. and wanted to use VBO.

infojunkie’s picture

Status: Closed (cannot reproduce) » Active

@hedac:
* Is it delete specifically that's causing the access denied? Or any action trying to apply on large number of nodes?
* What execution method are you using (direct, batch)?
* What VBO version?
* Do you see a difference when you change the php.ini memory_limit ?

Sinan Erdem’s picture

I also get access denied error:

- I am doing bulk update alias
- I am using batch update
- VBO version 6.x 1.9
- php.ini memory limit is very high for me (2 gig)

bojanz’s picture

Status: Active » Postponed (maintainer needs more info)

@etcetera9
Can you please update VBO to 6.x-1.x-dev and retest, please?
It is impossible to debug against old versions. Debug is always done against -dev (in drupal contrib in general).

Sinan Erdem’s picture

Sorry my mistake, I was already using dev.

bojanz’s picture

Status: Postponed (maintainer needs more info) » Active

Okay, thanks. Let's move forward then.

infojunkie’s picture

@etcetera9, to know what's going, please do the following:

* Clone file includes/common.inc to includes/common.bak
* Edit includes/common.inc and find function drupal_access_denied() around line 396. Change the line

watchdog('access denied', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);

to

watchdog('access denied', print_r(debug_backtrace(), TRUE), NULL, WATCHDOG_WARNING);

* Now run the VBO that causes the error again
* When the error occurs, open the Drupal log (admin/reports/dblog) and filter by Type = "access denied".
* Paste what you find here
* Restore includes/common.inc with your backup

Thanks!

hedac’s picture

@infojunkie
I have only tested deleting nodes older than a specified date by the views filter. the access denied page happens after the confirmation page. SO I guess it happens also in other modes.
I tried increasing the PHP memory limit to 182M with same result.
VBO version 6.x-1.10
using batch mode.

infojunkie’s picture

@hedac: I have posted a recipe for debugging in #23. Please apply it when you have time. Thanks!

bojanz’s picture

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

I was also facing same issue, so I have increased the max_allowed_packet = 32M as most of the time I was getting warning message regarding "max_allowed_packet ". Now I am able delete all the nodes (more than 20K). It works for me.

hedac’s picture

I can confirm changing max_allowed_packet helps.

bojanz’s picture

Title: Access Denied » Add a note to the README about fixing "Access Denied" errors by increasing max_allowed_packet.
Category: support » task
Status: Postponed (maintainer needs more info) » Active

So let's include a note in the README file and close this issue then.

infojunkie’s picture

Title: Add a note to the README about fixing "Access Denied" errors by increasing max_allowed_packet. » Fix "Access Denied" errors by increasing max_allowed_packet
Category: task » support
Status: Active » Fixed

Done. Turning into support request with appropriate title.

Problue Solutions’s picture

Status: Fixed » Active

Im also getting access denied, in my case changing max allowed packet has no effect whatsoever.

bojanz’s picture

Status: Active » Fixed

You have debug info in #12, #18 and (especially!) #23.
When you collect all that info, post it here and reopen the issue.

Also make sure you're using the latest 6.x-1.x-dev.

Problue Solutions’s picture

I updated to the latest dev version and now its an even bigger problem, it fails now after updating only one node:

"An error occurred while processing _views_bulk_operations_execute_single with arguments: _views_bulk_operations_execute_single"

bojanz’s picture

You are still not providing any information that would allow us to help you.

Problue Solutions’s picture

Neither the php error log or watchdog are providing anything other than what I have already posted.

I have reverted back to the latest stable release and increased the number of nodes per page as a workaround, because the problem only occurs when multiple pages are selected.

Status: Fixed » Closed (fixed)

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

ryan_courtnage’s picture

Today I was working with a site containing > 19,000 users, and ran into this "Access Denied" + "max_allowed_packet" warning message while trying to perform a VBO on all of the users at once. We don't run the kind a shop where developers can just go ahead and make changes to production servers, so a good reason is needed to change a mysql setting from the default of 1M to 32M. So I had to ask myself, "why exactly is this change required?".

After having a quick look, I believe that it is because the Batch API writes (to the 'batch' table) a serialized version of the entire dataset being operated on, as well all of the results from the operations.

trungonly’s picture

I think this is batch api issue, not VBO issue?