When I try to execute an operation on both a single node or a number of them, the process always hangs in the processing stage. It initializes and then stops at 1 of 2 (or however many). If I switch the page or hit the back button in the browser, I get a message about an Ajax HTTP request terminated... It is on the screen only a short time and I can't fully read it.
I have tried disabling the Devel module and that has no effect.
I am able to execute the operation if I change the settings so it is enqueued. It then executes successfully when I run cron.
I'm using Views 7.x-3.5.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | vbo-entity_load_capacity_fix-1817248.patch | 44.57 KB | drclaw |
Comments
Comment #1
bojanz commentedI am assuming you are executing VBO from the actual page, and not as a part of the preview in the Views admin UI?
This problem usually points to a module interfering in the process, so you need to check what else you have installed that might affect it (maybe a faulty theme? Are you using the Seven theme?).
Comment #2
bengt commentedAs I have - as it seems - a similar issue (http://drupal.org/node/1817488 now tagged as duplicate) I jump in here.
@bojanz: I have tried to figure out which module which can be interfering, but no success so far. I am using Seven as admin theme and Omega 3 as frontend theme (and I am not running the view from the preview in Views).
Do you have any other suggestions as where to look for interfering modules/theme functions?
Comment #3
bengt commentedI also have inactivated the module Organic Groups create permissions which I now interferred with VBO. After inactivation I did rebuild the permissions. But it didn't help.
Comment #4
bengt commentedNow I reverted back the site again to before all upgrades etc. I just wanted to check again what happens if I recreate (clone) the view "Content" (/admin/content2) from scratch. And it actually works fine until I activate the function "Modify entity values", then I get the same error again (it doesn't matter if I use this function or another - no function works after this activation). If I then deactivate "Modify entity values" and tries again, the error still persists!? I have tried this two times (recreated the view), so I can reproduce the error.
What do we make of this? Does the view get corrupted somehow when I activate "Modify entity values"? If so, what can cause that?
Comment #5
dbkern commentedI'm in the process of disabling modules to see if I can find a conflict and no success yet. I've also reverted back to Garland for both the admin and front-end themes. I tried to execute the save content operation on one node through the preview area in the view and it delivers an error message that I can reproduce here:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/ajax/preview/find_content/page
StatusText: parsererror
ResponseText:
Performing Save content on the selected items... | WEBSITE TITLE
@import url("http://mywebsite.com/modules/system/system.base.css?mc55z2");
@import url("http://mywebsite.com/modules/system/system.menus.css?mc55z2");
@import url("http://mywebsite.com/modules/system/system.messages.css?mc55z2");
@import url("http://mywebsite.com/modules/system/system.theme.css?mc55z2");
@import url("http://mywebsite.com/modules/system/system.admin.css?mc55z2");
@import url("http://mywebsite.com/sites/all/modules/jquery_update/replace/ui/themes/b...");
@import url("http://mywebsite.com/sites/all/modules/jquery_update/replace/ui/themes/b...");
@import url("http://mywebsite.com/modules/contextual/contextual.css?mc55z2");
@import url("http://mywebsite.com/sites/all/modules/date/date_api/date.css?mc55z2");
@import url("http://mywebsite.com/modules/field/theme/field.css?mc55z2");
@import url("http://mywebsite.com/sites/all/modules/flexslider/assets/css/flexslider_...");
@import url("http://mywebsite.com/modules/node/node.css?mc55z2");
@import url("http://mywebsite.com/modules/search/search.css?mc55z2");
@import url("http://mywebsite.com/modules/user/user.css?mc55z2");
@import url("http://mywebsite.com/sites/all/modules/views/css/views.css?mc55z2");
@import url("http://mywebsite.com/sites/all/modules/admin_menu/admin_menu.css?mc55z2");
@import url("http://mywebsite.com/sites/all/modules/admin_menu/admin_menu.uid1.css?mc...");
@import url("http://mywebsite.com/sites/all/modules/ctools/css/ctools.css?mc55z2");
@import url("http://mywebsite.com/sites/all/libraries/superfish/css/superfish.css?mc55z2");
@import url("http://mywebsite.com/sites/all/libraries/superfish/css/superfish-vertica...");
@import url("http://mywebsite.com/sites/all/libraries/superfish/css/superfish-navbar....");
@import url("http://mywebsite.com/sites/all/modules/views_slideshow/views_slideshow.c...");
@import url("http://mywebsite.com/sites/all/modules/context/plugins/context_reaction_...");
@import url("http://mywebsite.com/themes/garland/style.css?mc55z2");
@import url("http://mywebsite.com/themes/garland/print.css?mc55z2");
Skip to main content
WEBSITE TITLE
Main menuGreen Living
Events
Participate
About Us
Resources
Secondary menuMy account
Log out
You are hereHome
Performing Save content on the selected items...
Configure block
Powered by Drupal
Comment #6
dbkern commentedBengt,
Are the potential conflicting modules disabled in this roll back? I haven't had success with disabling modules to this point but I still have more to go.
Comment #7
bengt commentedNo, in the roll back all disabled modules are activated again.
Have you tried to clone the view "Content" and test? And then add "Modify entity values" and test? (See #4.)
Comment #8
dbkern commentedSorry, I'm not well-versed in VBO. Where do I find "Modify entity values?" I'm also concerned because I made changes to the original View and didn't remember to work off of a clone--though I believe I only changed the path and added the node save operation.
Comment #9
bengt commentedI am not at my computer right now, you find it if you click on the "field" Bulk operations (or something like that). But if you don't know that, your problem is not exactly the same as mine. Do your further testings on a clone.
Comment #10
dbkern commentedThat's where I was looking for it but I passed over it. No, I don't recall ever ticking the "Modify entity values" box so our issues are not identical. Though, that doesn't necessarily mean that our difficulties are the result of different issues.
Comment #11
bengt commentedJust to summarize my testing so far:
For me the error is always the same (see http://drupal.org/node/1817488), which is not exactly the same as for dbkern who gets a "parserror" (see #5), while I get a "access denied".
Anyone who can give any more clues where to look or how to test to isolate the problem(s)?
Comment #12
vacilando commentedSame problem, in 7.x-3.0 but also in 7.x-3.x-dev. Looks like a bug to me.
Comment #13
kgthompson commentedThis happened to me, but I don't have "Modify entity values" selected and I never have. It was working until I chose the Enable "Select all items on all pages". Afterwards I have the same behavior described above.
If I delete the cloned view and re-clone it and then don't check "Select all items on all pages" then it works, obviously this is not ideal.
Comment #14
ykyuen commentedI am having the exactly the same problem.
Comment #15
drclaw commentedHello all,
I spent some time digging around in views_bulk_operations.module and dpm()ing a few things. It appears the problem is coming from the "Number of entities to load at once" (entity_load_capacity) setting. At least in my case that was it. I was using the admin_content view that comes with VBO and the entity_load_capacity wasn't set (I think the view is a bit old because all the vbo settings don't appear to be keyed correctly...). Eventually when the batch operation tries to use this value to determine how many records to process per batch, but since it's empty/null, we end up in an infinite batch loop.
The fix is rather simple: Just set the "Number of entities to load at once" setting to some numeric value. It's supposed to default to 10.
Moving forward, I think the "Number of entities to load at once" setting could warrant a little extra validation (required, must be an integer). Either that, or add a default value to $vbo->get_vbo_option('entity_load_capacity') in _views_bulk_operations_execute()... or both... Also, I think the default view should be updated to include the entity load capacity setting.
I've attached a patch that does the following:
I feel that this pretty well covers all bases to avoid the infinite loop in the batch process function. It might look like a heavy patch, but most of that is just the default view update. The other changes are quite small.
Comment #16
ykyuen commentedis the patch only works for 7.x-3.x-dev? i applied it to 7.x-3.0 and the problem still persists.
currently i fallback to use the 7.x-3.0-rc1 and it works fine.
Comment #17
bojanz commented@ykyuen
You have an old view. You need to recreate it (remove and readd the VBO field). That will fix it.
Comment #18
ykyuen commentedThanks for your reply. #15 patch works perfectly.
Comment #19
bengt commented@drclaw: thanks for your input in #15!
Before I saw your answer, I tested to recreate the view "admin/people2" manually from scratch. I ended up with a view which is the same as "admin/people2", except for one thing: I don't get the bulk progress bar. And it works fine, even with the "Select all items on all pages" setting activated. The "Number of entities to load at once" setting is automatically set to the default value of "10".
Is it possible get the bulk progress bar in a manually created view?
Comment #20
drclaw commentedI believe you get the bulk progress bar only when you have more items than the "Number of entities to load at once" selected. If you have less, the function is just invoked directly... Could that be the problem?
Comment #21
bojanz commentedOkay, looked into this.
The problem is in the buggy VBO update code, by updating the settings it unintentionally wipes out the defaults, so we have cases where crucial settings don't have any default values. The fix is a one liner:
http://drupalcode.org/project/views_bulk_operations.git/commitdiff/f5af1...
Also, removed the default views completely: #1844708: Remove the default views now that admin_views is stable.
Please test tomorrow's 7.x-3.x-dev, I will tag 7.x-3.1 in the next few days.