I am encountering the error "The selected nodes do not have any editable fields. Please select other nodes and try again" (loclized string: "Die ausgewählten Beiträge haben keine editierbaren Feldern. Wählen Sie andere Beiträge und versuchen Sie es erneut") on several D6 sites since updating to VBO 6.x-1.11. Bulk operations on fields are impossible, thus setting the priority to "major".

In the View, all fields are selected on "Display fields", including "All fields". Other settings:

  • Use Batch API: checked
  • Maximize Batch API performance: unchecked
  • Preserve selection across pages: checked
  • Display results: checked

Core/modules: Pressflow 6.22, Memcache 6.x-1.9, Blockcache Alter 6.x-1.4, Views 6.x-2.12, VBO 6.x-1.11 (plus boost, javascript_aggregator, css_gzip, job_scheduler; hard to guess what might be involved). Running Debian "Lenny" with memcached 1.2.2-1+lenny1, php-memcache 3.0.1-1 and php-apc 3.0.19-2.

In one reply the same error was reported in #361871: VBO loses selection with caching module, so this issue might be related or a duplicate to the long-standing problem with caching. However, #361871 dates back to 2009, and I've never encountered the problem before with VBO, and I'm using as well VBO and APC/Memcache for years.

Comments

asb’s picture

Watchdog doesn't log anything like "The selected nodes do not have any editable fields", but when I edit the view I'm getting an error:

User warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY td.weight, td.name' at line 1 query: SELECT tn.vid AS node_vid, td.*, v.name as vocabulary FROM term_data td INNER JOIN term_node tn ON td.tid = tn.tid INNER JOIN vocabulary v ON v.vid = td.vid WHERE tn.vid IN (22200, 22197, 22198, 22199, 22196, 22195, 22107, 22106, 22109, 22110, 22111, 22114, 22112, 22116, 22113, 22115, 22117, 22118, 22120, 22121) AND td.vid IN () ORDER BY td.weight, td.name in _db_query() (line 148 of /var/www/drupal/includes/database.mysql.inc).

Not sure if this is related to the issue, and not sure either what is supposed to be the problem with the Views-generated query. Also, nothing relevant logged in the server's syslog about failures of memcache or APC.

To figure out if memcached and the Memcache integration module is involved in my problem, I disabled the 'Memcache' and 'Memcache Admin' modules, and removed the memcache servers and bins from settings.php, then did a 'drush cc' (all), and ran VBO again, with the same result; so judging from this quick test I am not sure if or to what degree Memcache is actually involved in the problem.

My settings for the memcached integration from settings.php:

$conf = array( 
  'cache_inc' => './sites/all/modules/memcache/memcache.inc', 
  'memcache_servers' => array( 
    'localhost:11211' => 'default', 
    'localhost:11212' => 'block', 
    'localhost:11213' => 'content',   
    'localhost:11214' => 'filter', 
    'localhost:11215' => 'form', 
    'localhost:11216' => 'menu', 
    'localhost:11217' => 'page', 
    'localhost:11218' => 'update', 
    'localhost:11219' => 'views', 
  ), 
  'memcache_bins' => array( 
    'cache' => 'default', 
    'cache_block' => 'block', 
    'cache_content' => 'content',  
    'cache_filter' => 'filter', 
    'cache_form' => 'form', 
    'cache_menu' => 'menu', 
    'cache_page' => 'page', 
    'cache_update' => 'update', 
    'cache_views' => 'views', 
  ), 
  'memcache_key_prefix' => 'mysite', 
);

Edit: On another site I'm experiencing the same issue when trying to run VBO operations on fields, but watchdog logs here a couple of messages/warnings:

Warning: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in views_bulk_operations_fields_action_form() (line 103 of /var/www/drupal/sites/all/modules/views_bulk_operations/actions/fields.action.inc).
...
Warning: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in db_placeholders() (line 275 of /var/www/drupal/includes/database.inc).
...
Warning: array_fill() [<a href='function.array-fill'>function.array-fill</a>]: Number of elements must be positive in db_placeholders() (line 275 of /var/www/drupal/includes/database.inc).
...
Warning: array_map() [<a href='function.array-map'>function.array-map</a>]: Argument #3 should be an array in views_bulk_operations_fields_action_form() (line 101 of /var/www/drupal/sites/all/modules/views_bulk_operations/actions/fields.action.inc).
...
Warning: array_fill() [<a href='function.array-fill'>function.array-fill</a>]: Number of elements must be positive in views_bulk_operations_fields_action_form() (line 101 of /var/www/drupal/sites/all/modules/views_bulk_operations/actions/fields.action.inc).
sambaynham’s picture

I'm experiencing this issue as well, with the current dev version of VBO.
Interestingly, this only happens on my test server, which runs PHP 5.3. On the live server, which runs PHP 5.2, there is no such problem.

*EDIT* Downgraded PHP to 5.2.11 on test server, still getting the bug. It's not the PHP version.

sambaynham’s picture

With a bit of experimentation, have found that bug only occurs when All (all pages) is selected. When All (this page) is selected, no issue occurs.

asb’s picture

bojanz’s picture

Looks like Select All (all pages) is buggy somewhere.
Saw the same bug reported in http://drupal.org/node/1098206#comment-5066104.

bojanz’s picture

Title: The selected nodes do not have any editable fields - Bulk operations on fields impossible » Problems with executing operations after using Select All (All Pages)

Retitling.

socialnicheguru’s picture

Issue tags: +Node Export

this also affects modules like node_export

bojanz’s picture

Can you retest with 6.x-1.x-dev?
I think the listed errors in #1 are related to a db_placeholders() issue I fixed shortly after 6.x-1.11 was released.
So let's see if there are problems remaining with 6.x-1.x-dev, and get a 6.x-1.12 out.

asb’s picture

Version: 6.x-1.11 » 6.x-1.x-dev

I updated to 6.x-1.x-dev, ran update.php (no updates), and did a 'drush cc' (all). Issue still exists :-(

bojanz’s picture

Title: Problems with executing operations after using Select All (All Pages) » Select All (All Pages) is hopelessly broken
Priority: Major » Critical

I did some investigating and testing. Select all on all pages is hopelessly broken.

The problem will be fixing it, since the post-6.x-1.10 code introduced the new complex handling of preserving selection, and select all, etc...
This is code that I'm just not familiar with, in a branch I don't maintain, so I can't really promise a quick fix.

infojunkie’s picture

Confirming this bug and working on it.

infojunkie’s picture

What's happening here is that the new selection code tries to preserve memory, so when "Select All (All Pages)" is chosen, only a flag is kept in the selection array, instead of all view results.

The problem occurs because the action "Modify node fields" and others expect the selection array to be filled with actual objects.

Given all the forces acting on this issue - new selection behaviour that breaks many actions, memory consumption issues still not resolved - I think I will revert to VBO's pre-6.x-1.11 logic of filling in the selection array with all view results instead of a flag.

This fix will require a few days, during which your feedback or suggestions are welcome.

infojunkie’s picture

Status: Active » Fixed

Fixed in the latest dev. Please try it and let me know!

asb’s picture

@Karim: Thanks a lot for your work! I did some preliminary tests with not too large data sets; so far

  • I did not encounter any new regressions; e.g. "Select All (This Page)" still works. Good ;)
  • I did not encounter the "Select All (All Pages)" bug with bulk modifications on fields or taxonomy terms anymore

I tried this with data sets of 25 and 150 records per page, spanning one or multiple pages. No problems whatsoever, seemingly as robust as 6.x-1.10.

This applies to views_bulk_operations 6.x-1.x-dev from 2011-Oct-13, as downloadable through 'drush' a couple of hurs ago. This dev release is a definitive improvement.

Again, thank you very much!!!

infojunkie’s picture

Thanks asb for your testing.

Status: Fixed » Closed (fixed)

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

kb_0’s picture

When do the VBO devs plan on moving this bug fix into the stable release? We were unaware of this issue until we sent out some very sensitive email to several members of a group that should not have received it. Extremely embarrassing. We are now running 6.x-1.x-dev and it works correctly but we run stable code on our site...

bojanz’s picture

This fix is a part of the 6.x-1.12 release released on october 14th.
I have just created a 6.x-1.13 release that contains infojunkie's fixes made since then.

kb_0’s picture

More detail: We were running 6.x-1.12. An admin selected a list of group content using the VBO "All (all pages)" selector, unchecked a set of names from the table and sent an email using the "Send email to the creator of the node" action. The confirmation page correctly listed the names excluded from the action. However, everyone on the list got the email, even those that were unchecked and excluded. And like I said, it was sensitive material. Sigh. Many thanks for the new release. We will switch over immediately.

bojanz’s picture

That sucks :/
Hoping that the new release treats you better.
You might want to make sure that the "Persist selection" option is disabled.
It causes VBO to run a new Drupal request (via AJAX) for every checkbox changed, so sometimes when you submit the form not all changes have gone through.
See in #1287264: When "Preserve selection across pages" is enabled, it is possible for a row to be dropped from the selection..
Still, in that case the confirmation step tells you how it is, there are no surprises after that.

asb’s picture

Version: 6.x-1.x-dev » 6.x-1.13
Status: Closed (fixed) » Active

For me, the issue is back again in 6.x-1.13; on several sites, selecting anything across multiple pages does not work at all, anymore, again. As in the initial bug report against 6.x-1.11, operations like changing the content of fields does only work on one page.

All operations than span the complete result set lead to erratic operations; e.g. the changes are applied to some subset (8 out of 43 items), or to unselected items (!), and sometimes the operations summary does not match the records that have been altered.

As we suspected before, this might have to do with caching (core, APC, memcached, etc.; cf. #361871: VBO loses selection with caching module). All my sites are using this kind of caching, others might not and thus not encounter this issue. Additionally I'm running Views 3 on some of the sites (the inital report was against Views 2).

Currently, 6.x-1.13 must not be used in production environments without thourough prior testing, otherways results like described in #17 (or a lot worse) might happen.

The old workaround still applies: Don't run bulk operations across multiple pages of results; instead edit your View to show a larger result st (e.g. 50 instead of 25 items). If problems occur with bulk operations across the full result set, don't run any VBO on such large result sets.

fourmi4x’s picture

Suscribing, this is so critical. We have the same configuration as described above (views 3 and APC/caching systems), and are experiencing these bugs too.

Is there any risk that more items than selected will be processed? (especially in the case of a deletion!)

infojunkie’s picture

For the people experiencing this: I would appreciate getting access to your dev environment, to be able to see this in action and maybe get a chance to debug it on site. Please contact me if you can provide me with access.

asb’s picture

We do not have a pure dev environment that could be accessed from outside (for obvious reasons); all our staging servers on the Internet have stuff like APC/Memcache enabled and can not be reconfigured easily without breaking something else.

However, the request ist absolutely reasonable, and I'll try to figure something out (might take a while). If someone is quicker, please stp up ;)

infojunkie’s picture

Providing me with a virtual machine would work too. If there are privacy concerns, I'd be willing to sign an NDA (as long as it doesn't affect my work on VBO).

asb’s picture

F'up to #555722: how to bulk assign taxonomy terms to nodes. Disabled the modules 'Memcache' and 'Memcache admin', and removed the relevant settings from settings.php on the sandbox site. Now I'm getting the "The selected nodes do not have any Content Taxonomy fields" error again when I try to run a "Modify content taxonomy terms" operation "across all pages".

If I select "Modify node taxonomy terms", make a selection for 822 items and click on "across all pages" and "Execute", I'm either getting "The selected nodes are not associated with any vocabulary", or (!!!) the announcement that VBO will process 25 (!!!) items. It seems to be erratic what happens (if/which error message is given, if/how many items are being processed, etc.).

@infojunkie: Please try to reproduce. VBO view is at ./admin/content/vbo, select "Nodetype = Ausgabe", and "Benutzer = knm". This should get a result set with 822 items. Then run on some taxonomy or field operation across all pages, from this point on I can not reproduce anything with some certainty. E.g. when trying "Modify node fields", I get a form with *all* defined fields (not just those available in the selected content type). When I edit an *exisiting* field and proceed, nothing is being processed; message: "No items were processed".

Question to the experts: If the 'Memcache' module is disabled as a module and in settings.php, is it really not used by Drupal/Pressflow if memcached is still active on the server???

infojunkie’s picture

Thanks @asb for the info and access to the server. I'll be looking at this closely over the next week.

asb’s picture

@infojunkie: You are welcome - please take all the time you need - and many thanks for your helpfullness!

It'd be great if we could actually track down the nightmare issue #361871: VBO loses selection with caching module and this one (#1296626), or at least some parts of it ;)

manuel garcia’s picture

Just reporting my experience with this issue,

We were trying to launch a custom defined action on > 10k nodes, so selecting all rows and using batchapi was critical. What ended up working was:
1. Disabled Preserve selection across pages.
2. Disabled ajax on the view.
3. Checked skip confirmation step.

After these three steps, we were able to execute the action on all rows, consistently.

Using vbo 6.x-1.12 and views 6.x-2.16.

infojunkie’s picture

Based on @asb help with testing a faulty environment, I found a possible bug and committed a fix. Other subscribers here, please check out the latest dev.

asb’s picture

Version: 6.x-1.13 » 6.x-1.x-dev

Here are my test results for the current dev release.

Relevant settings:

  • Use Batch API (checked)
  • Preserve selection across pages (checked)
  • Display processing result (checked)
  • Skip confirmation step (not checked)
  • The memcache integration module is enabled and configured in the site's settings.php; as recommended, I'm only using one memcache server and one bin ("default"). The memcached instance is started with a size of 1,024 (default is 64M) and, when the cache is warmed, it's filled to 80-90%.

Action: Modify node taxonomy terms

  • Size of data set: 589 items, selection "across all pages"
  • Observations during processing: Multiple times "PHP Fatal error: Maximum execution time of 30 seconds exceeded" in multiple locations, e.g. ./sites/all/modules/memcache/dmemcache.inc on line 41, ./sites/all/modules/views/includes/base.inc on line 71, ./sites/all/modules/views/includes/handlers.inc on line 31; ./sites/all/modules/views/includes/view.inc on line 1854, ./sites/all/modules/views/plugins/views_plugin_display_page.inc on lines 0 (!), 38, 57 and 938 et al.; Processing takes excessively long (>2.5 hrs)
  • Overall result: Action is working properly; bulk operation successfully finalized; modifications were accomplished.

Action: Modify content taxonomy terms

  • Size of data set: 829 items, selection "across all pages"
  • Observations during processing: Again multiple times "PHP Fatal error: Maximum execution time of 30 seconds exceeded", multiple locations (as above) plus multiple "child pid 26667 exit signal Segmentation fault (11)"; Processing takes even more excessively long (>4.5 hrs)
  • Overall result: Action is working properly; bulk operation successfully finalized; modifications were accomplished.

Action: Modify node fields

  • Size of data set: 6,301 items, selection "across all pages"
  • Observations during processing: Multiple times "PHP Fatal error: Maximum execution time of 30 seconds exceeded", multiple locations (as above) plus multiple "child pid 26667 exit signal Segmentation fault (11)"; Processing this one takes virtually forever (~10.5 hrs)
  • Overall result: Overall result: Action is working properly; bulk operation successfully finalized; modifications were accomplished.

The numerous "PHP Fatal errors" in Apache's error log are ugly und pretty frightening; probably they indicate that something isn't right in multiple places, but I did neither notice a negative side effect (except a bloated error.log), nor were the errors actually "fatal" for the bulk operation.

I can not tell why processing these actions is so slow. I ran the tests on a server with Intel Xeon i7 W3520 and 24 GB of RAM; the average load without any running bulk operations is between 1.5 and 2.0, and even when processing large bulk operations it never exceeded 3.5. However, more important than speed is reliability, and regarding this the current dev code is an incredible improvement. With enabled memcache, I did not encounter the blank screen/WSOD I got a couple of days ago when processing the large 6k datase dataset, so I didn't file a issue in the memcache modules issue queue.

Unsystematically, I encountered that the "Modify node fields" action gave a screen with all fields available on the whole site; the correct behaviour is to only show the fields that can actually be edited according to the previous selection. However, this behaviour occured unsystmatically, not very often, and I can not provide a procedure to reproduce it. The workaround is to cancel the bulk operation and to re-apply the filter. A bit annoying, but no big dead, I think.

What still is not working properly: I can not select some items from a result set (by clicking on the checkbox) and apply the bulk operation selectively only to exactly those checked items. As in earlier versions of VBO, the bulk operation is applied to some unchecked items as well. However, it is *not* applied to all items of the result set, but I haven't yet figured out if there is a systematic offset. Also, selections across multiple page result sets still do not work at all for me, even if "Preserve selection across pages" is checked. As for now, this setting probably should be unchecked by default, as Manuel Garcia suggested in #29. I need to investigate the "Preserve selection across pages" issue further and start with an disabled mememcache integration again.

In a nutshell: For me, the current dev release is a huge improvement without regressions.

infojunkie’s picture

Thanks asb for the very helpful report. If you agree, I will continue to work on your environment to track down remaining bugs.

asb’s picture

Of course, you can use is as long as you have the patience and energy.

salberto25’s picture

Hi every one:
I have one problem with VBO:
Im using the action Modify fields node, but when i select for example 10 rows and select the fields that I want modify, in the confirm step appears only 5 rows , sometimes less and that rows are the only ones saved and not the 10 rows that I select in first time.
Sorry for my bad english.
thx.

likewhoa’s picture

Version: 6.x-1.x-dev » 7.x-3.x-dev

i can confirm that #361871: VBO loses selection with caching module is a problem with memcache module. but after I disable it i get the following in dblog

Warning: Invalid argument supplied for foreach() in _ispreg_generate() (line 100 of sites/all/modules/ispreg/ispreg.module).
Notice: Undefined index: fields in _ispreg_generate() (line 100 of sites/all/modules/ispreg/ispreg.module).

while trying to batch generate 1280 node styles.

EDIT: n/m the warning and notice, as I overlooked the module location and shouldn't be related to VBO. I will file this on the ispreg module, but my first sentence is on topic.

bojanz’s picture

Version: 7.x-3.x-dev » 6.x-1.x-dev
Status: Active » Fixed

#35 is not related to the rest of this issue.

As far as I can see, work on this issue has stopped. Some bugs were fixed.
If anyone is willing to work on additional bugs, they can reopen the issue with a patch.

infojunkie might want to make a new release, since VBO 6.x-1.x-dev is now 27 commits ahead of the latest release.

asb’s picture

Version: 6.x-1.x-dev » 6.x-1.13

I'm using 6.x-1.x-dev, and it is a lot more robust than the recommended release. At least for my use cases it does not have any side effects compared to 6.x-1.13. However, some smaller issues remain (some selective selects choose wrong items etc.), but this one can be considered fixed in 6.x-1.x-dev.

But: Shouldn't we keep this issue open until a new release with the fixes has been published??

bojanz’s picture

It's not usual to do so in Drupal contrib.
I will ping infojunkie about creating a new release, and tag a new one myself if he doesn't do so in the next week or so.

EDIT: I've spoken to infojunkie and tagged the 1.14 release.

Status: Fixed » Closed (fixed)

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

asb’s picture

Thanks for the new release, 6.x-1.14 runs pretty smoothly!