As the title says the Image Picker dialog box for uploading images shows up in the Search Form block. Drupal verson 6.13, image picker 6.x-2.1

http://oniring.com/screen.png

right now I am just using css to put its display to none within the that content area. But it still loads, or trys to load. Some times I get a page load canceled. I dont want to disable the block open to image pickerl...

Sorry if this is already a known issue or if there is a fix for this already. Please point me in the right direction if their is.

CommentFileSizeAuthor
Picture 1.png121.5 KBsicbot

Comments

hutch’s picture

Oh dear! How bizarre!

Not a known issue, I will investigate

hutch’s picture

Priority: Normal » Critical

OK, I will have to revisit 'enable imagepicker in blocks', meanwhile you can disable it in the admin settings for imagepicker
I did not have the search block enabled when I tested this ;-(

sicbot’s picture

Well I'm glad I could bring this to your attention then. Thankfully I can hide it with with css at least (I want to keep image picker available in blocks for this client.)

hutch’s picture

I have found the problem, the preg_match() was too general and was picking up the search block form as well

For anyone needing to fix this straightaway
In imagepicker.module, function imagepicker_form_alter()
replace this line:

  if (preg_match('/block_form$/i', $form_id) && variable_get('imagepicker_blocks_enabled', 0)) {

with this line:

  if ( ( $form_id == 'block_add_block_form' || $form_id == 'block_admin_configure' ) && variable_get('imagepicker_blocks_enabled', 0)) {

Please test and report back, TIA

I will have a fix in CVS shortly

hutch’s picture

Status: Active » Needs review
sicbot’s picture

Thank you very much!

Replaced the line with the new one and it does not show in my search form block any longer. =)

hutch’s picture

Version: 6.x-2.1 » 6.x-2.x-dev
Priority: Critical » Normal
Status: Needs review » Fixed

Drupal certainly has its quirks, lol
Your firebug screenshot helped, I could see what was causing it straightaway.

Status: Fixed » Closed (fixed)

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