Hi,

Each time I validate a popup, I have this message :


The popup content area for this theme is misconfigured.
There is no element that matches "div.left-corner > div.clear-block:last"
Go to admin/build/themes/settings, select your theme, and edit the "Content Selector" field

If I go to admin/build/themes/settings, I don't have options related to the "content selector"...

CommentFileSizeAuthor
#8 popups.module.patch744 bytesdavidwhthomas
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

starbow’s picture

Category: bug » support
Status: Active » Fixed

go to
admin/build/themes/settings/your_theme

zmove’s picture

Ah ok, I understood.

As I have only one theme enabled, it's not a path I have, cause I don't have the secondary tab to select the theme I want to configure.

If I go to that path by hand, it bring errors.

So I think the module should test somewhere how much theme are enabled to add this option on the right path.

zmove’s picture

Status: Fixed » Active
zmove’s picture

Category: support » bug
starbow’s picture

Category: bug » feature
luckysmack’s picture

I am having this same issue, I have no "content selector" anywhere in my theme configuration pages. any word on this being updated?

davidwhthomas’s picture

as mentioned earlier, you need to visit

admin/build/themes/settings/your_theme

However, Drupal also uses

admin/themes/settings/your_theme

as a valid theme settings config page which won't show the config textfield.

This is because the code in popups.module looks for the fifth part of the URL for the theme ( starts at 0 )

popups_form_alter ( line 104 )

  // Alter the theme configuration pages, to add a per-theme-content selector. 
  $theme = arg(4);

It could be updated to more intelligently get the theme name based on the two possible paths, e.g

<?php
  // Alter the theme configuration pages, to add a per-theme-content selector. Check both possible paths.
  if( arg(2) == 'themes' && arg(4) ){
    $theme = arg(4);
  }elseif( arg(1) == 'themes' && arg(3) ){
    $theme = arg(3);
  }else{
    $theme = FALSE; // not theme settings page
  }
?>

DT

davidwhthomas’s picture

FileSize
744 bytes

Patch for above snippet attached.
DT

starbow’s picture

Status: Active » Needs review

@davidwhtthomas: thanks for the patch. This looks like a good addition.

kewlguy’s picture

Patch from #8 worked like a charm for me
My Bad!, The error still persists on my 'content types' page.....sigh! Sorry for not posting this sooner. The error is more of an annoyance than anything else.

jefkin’s picture

I still have issues with this probably because I have no idea what is meant by "Content Selector", so I wouldn't know what to set it to. However in fixing up my forms to use popups, I found a way to keep them working.

1) in the '#submit' handler for the form (that builds the popup html), I include a drupal_goto(...) pointing to my listing page.

2) in my hook_popups, I include the options: array ( 'noMessage' => true, 'reloadWhenDone' =>true );

All of which means if I use the submit button from the form in the popup, it silently redirects me back to my list page with a refresh. And for those js challenged people, (graceful degradation) if I hit an edit page directly (not via popups) then it jumps back to my listing page on submit.

This obviously is skirting this issue, but I think it's important for at least a possible help to be presented.

jonigual’s picture

Hi jefkin,
Thanks! Your fix worked perfect for me! But then, reading the README.txt of popups module I found the instructions for setting Content Selector value. They are at the beggining of the txt file, under the "IMPORTANT INSTRUCTIONS" title. Basically you have to open the page.tpl.php and find where the "print $content" is done. Then check the div that is wrapping that print, and set the JQuery selector for that div in the Content Selector of your theme. This one also worked for me.
Hope you find this info helpful!

jefkin’s picture

Hi Joniqual,

I followed the instructions you suggested, but it still didn't work for me, I think probably because I wasn't using the bleeding edge version (and can't for the particular site), so I'll keep my work-around for the time being.

Thanks.

asb’s picture

One year later... still no progress on this issue, #8 seems to not have been committed to the dev release, the setup instructions are still unclear, and out of the box the module breaks basically any theme except Garland.

Neither the instructions from #12, nor those from the module's README.TXT work for me. The last commit to the dev release was over one year ago, this module appears pretty dead. Uninstalling :-(

NamesBuying.com’s picture

README.txt > IMPORTANT INSTRUCTIONS

However, theme's content area selectors are different. You need to find your theme's correct selector, i.e. I use zeropoint theme; my theme's $content in page.tpl.php file:

         <div id="main">
            <?php if ($mission) { ?><div id="mission"><?php print $mission ?></div><?php } ?>
            <?php if ($content_top):?><div id="content-top"><?php print $content_top; ?></div><?php endif; ?>
            <?php if ($title): if ($is_front){ print '<h2 class="title">'. $title .'</h2>'; } else { print '<h1 class="title">'. $title .'</h1>'; } endif; ?>
            <div class="tabs"><?php print $tabs ?></div>
            <?php print $help ?>
            <?php print $messages ?>
            <?php print $content; ?>
            <?php print $feed_icons; ?>
            <?php if ($content_bottom): ?><div id="content-bottom"><?php print $content_bottom; ?></div><?php endif; ?>
          </div>

Thus, the working content selector for "zeropoint" theme is #main !
without apostrophe ( ' ) before or after

Find the div that containing your content in your theme's page.tpl.php file.