0

I am attempting to use VBO's "Lock Files" operation to prevent some files without file usage records from being randomly deleted (it happens). I am open to alternate means of doing this as well as a solution to this specific problem.

VBO has never worked great. Particularly the options to "select all on this page" or "select all on all pages" almost never show up. Every once in a while it will but there seems to be no rhyme or reason there.

Whether I select multiple files or a single file from the view preview results, when I attempt to execute the "lock file" operation, on the "confirm" step, I get a js alert box pop up with this error:

An AJAX HTTP error occurred HTTP Result Code: 200 Debugging information follows. Path: /admin/structure/views/ajax/preview/files_check/default StatusText: ResponseText: window.NREUM||(NREUM={}),__nr_require=function(e,t,n){function r(n){if(!t[n]){var o=t[n]={exports:{}};e[n][0].call(o.exports,function(t) {var o=e[n][1][t];return r(o||t)},0,0.exports)}return t[n].exports} if("function"==typeof__nr_require)return__nr_require;for(var o=0;o Performing Lock selected files on the selected items...

This does not appear to be the complete error, but since the error is in the alert box instead of the console there appears to be no way to access the full error.

After I clear the alert box I still have the confirm button and cancel link. When I click confirm I just get the error again. When I click cancel I return to my preview but now the "select all..." options are visible. All further attempts still generate the same error though.

This is the query output by my view

SELECT DISTINCT file_managed.fid AS fid, file_managed.timestamp AS file_managed_timestamp, file_managed.filename AS file_managed_filename, file_managed.uri AS file_managed_uri, file_usage.count AS file_usage_count
FROM 
{file_managed} file_managed
LEFT JOIN {file_usage} file_usage ON file_managed.fid = file_usage.fid
ORDER BY file_usage_count ASC, file_managed_timestamp ASC
LIMIT 10 OFFSET 0

I have tried this by setting the advanced "Use Ajax" option to both yes and no with the same result.

Drupal (7) core and all modules are up to date.

I'd be happy to provide any additional information needed. Please advise.

0

200 means that a response was returned successfully, but the response is not something your code can work with, which is why you are getting the error. It looks like the response is returning a script, rather than whatever is expected (likely JSON).

  • I'm not writing any code, just trying to use this module for its intended purpose. Unfortunately it seems to be quite buggy and not getting updated. – Anonymous Man Mar 23 '18 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.