The IMCE file browser toolbar buttons disappear and clicking on files is disabled when Clientside Validation is enabled with default settings.

Hard to say this is a bug but you have to add imce to the exclude paths in the General Settings of Clientside Validation to re-enable the IMCE toolbar buttons and file browsing.

Just adding this here to let others know as this issue seems to have been posted in several places in drupal.org. I doubt that all are related to the Clientside Validation module as there are several solutions that have been confirmed to work other than this one.

In my case this was the only solution that worked.

Might be worth including this as a default settings example.

Comments

attiks’s picture

Assigned: Unassigned » Jelle_S

did you get any error messages in javascript?

inventlogic’s picture

The one error that showed up in Firebug.

this.data is undefined
[Break On This Error] 	
this.forms = this.data['forms'];

Traced it to clientside_validation.js

/**
* local copy of all defined forms
* @memberof Drupal.clientsideValidation
* @type array
* @readonly
*/
this.forms = this.data['forms'];

Creating a break in Firebug at the point above doesn't change anything but a break at the following function then stopping the page loading brings the toolbar buttons back.

/**
* Drupal.behaviors.clientsideValidation.
*
* Attach clientside validation to the page or rebind the rules in case of AJAX calls.
* @extends Drupal.behaviors
* @fires clientsideValidationInitialized
*/
Drupal.behaviors.clientsideValidation = {
attach: function (context) {
if (!Drupal.myClientsideValidation) {
Drupal.myClientsideValidation = new Drupal.clientsideValidation();
}
else {
var update = false;
jQuery.each(Drupal.settings.clientsideValidation.forms, function (f) {
if ($(context).find('#' + f).length || $(context).is('#' + f)) {
update = true;
}
});
//update settings
if (update) {
Drupal.myClientsideValidation.data = Drupal.settings.clientsideValidation;
Drupal.myClientsideValidation.forms = Drupal.myClientsideValidation.data['forms'];
Drupal.myClientsideValidation.groups = Drupal.myClientsideValidation.data.groups;
Drupal.myClientsideValidation.bindForms();
}
}
/**
* Let other modules know we are ready.
* @event clientsideValidationInitialized
* @name clientsideValidationInitialized
* @memberof Drupal.clientsideValidation
*/
jQuery.event.trigger('clientsideValidationInitialized');
}
}; 
Jelle_S’s picture

Status: Active » Fixed

Fixed in latest dev. Everything should now work without having to exclude the path (don't forget to clear the cache, clientside_validation.js was changed)

Status: Fixed » Closed (fixed)

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