Go to Configuration > Popup elements > Formats then started getting a list of these:

Notice: Undefined index: 0 in popup_preprocess_popup_element() (line 292 of /home/gene/public_html/sites/all/modules/popup/popup.module).

Comments

tommann’s picture

I am having the same issue, any thoughts?

Anonymous’s picture

Same issue for me too. A patch would be great. :)

Scheepers de Bruin’s picture

I cannot replicate this with a vanilla Drupal installation... Later today I'll commit my current version. That may fix this, whatever it is - though I cannot see any difference between my current dev version of popup.module and 1.0...

Try going to: /admin/config/user-interface/popup

Save the configuration and see if it persists...

Sean-Khan’s picture

I'm getting errors in 1.0 and dev both.

Peter223’s picture

I'm getting this error as well! There are 10 or more of these errors inside the popup options.

jlongbottom’s picture

Notice: Undefined index: 0 in popup_preprocess_popup_element() line 29

me too

EDIT:

OK heres a crappy temporary solution (it at least removes the error messages)

replace line 292 with these 2 lines:

$path = '';
if($style) $path = $styles[$style];
jay.lee.bio’s picture

Thanks for sharing the temporary solution.

Greg J. Smith’s picture

I'm getting this error on a vanilla Drupal install. Have been using module for less than an hour, was setting up a default menu through the 'formats' UI with no issues. The first time I used global settings, and changed the style there to 'default' I started getting this message. The quick fix at #6 works for the time being.

Scheepers de Bruin’s picture

Status: Active » Closed (fixed)

Thanks all, fixed in new release

restyler’s picture

it's still there in 1.2 release which was released after your message.

Greg J. Smith’s picture

I'm still getting this error message in 1.2 as well.

motomc’s picture

Version: 7.x-1.0 » 7.x-1.2

I've just installed and have the same error too

manys’s picture

thoughtcat’s picture

I am getting this in the latest release. Not a vanilla install though.

sreese’s picture

I am also getting this error with the latest release. The exact same message as seen in #13 above.

sreese’s picture

A little more information that might be helpful:

I seem to have gotten rid of the error by setting the global settings in admin/config/user-interface/popup. Previously I had left these as the defaults but I changed a couple of the values and submitted and now the error is gone. I thought I would include this here as a possible "quick fix" and as another data point for tracking down the cause of the issue.

sreese’s picture

Status: Closed (fixed) » Active
nicholsonma’s picture

I'm getting these errors with the latest release. Everything was fine till I went to the Global Settings page and made a change to the default width. Now I get the errors mentioned above plus the background of the popup blocks don't show correctly - they are totally transparent.

A fix would be appreciated. For now I'm going to try uninstalling and reinstalling and staying away from the Global Settings page!

*update*
uninstalling and reinstalling didn't fix the problem. It came back when I reinstalled.

**update**
Made the changes given in #6 and that fixes the problem, however, the lines to change are different in version 1.2. You need to replace line 279 with the 2 lines of code in #6. For non php programmers, you don't include the opening and closing php tags from #6, just the two lines:
$path = '';
if($style) $path = $styles[$style];

BTW, awesome module and just what I was looking for. Better documentation would be appreciated but then I realize this is the Drupal world....

rajmataj’s picture

I am also getting this same error after just installing the module (7.x-1.2). I did try going to /admin/config/user-interface/popup and saving but still get numerous:

Notice: Undefined index: 0 in popup_preprocess_popup_element() (line 279 ......
errors.

Using Drupal 7.19

Julien Vidal’s picture

I'm in your case too,

$style variable are not initialize so the line of code given in #18 and #6 works but if you
take a look at your brower console log, some css are not loaded.

This variable must be set at a default value corresponding at popup style.
$style = 'White' set the White theme by default.

This error append to me when I try to use Popup tags.
You can fix it by adding a style attribute in your tag.

Example : [popup style=White id=et-bien-plus text='inside popup text' effect=fade title='et bien plus !'].
This attribute are not mentionned in the documentation but it works...

Conclusion :
- Set a default value directly in the module
OR
- Try to set theme value where you have the error.

Edit :
The error seem to append when you have no style choosen in popup configuration.
If you want patch this error,
-> Use a default theme
-> Use no theme but use the patch #6 / #19 and remember to duplicate the css in error in your theme.

Hope this post help someone :D

davidcsonka’s picture

I can confirm that the problem went away after I selected a style in the Popup Global Settings tab. Nice detective work Vidal!

Anonymous’s picture

What if you want to select No style? What is the solution for this option? Apparently this is still a bug.

eme’s picture

In the meantime, if you don't want to hack the module, you can user hook_popup_style and define your own "no style" popup.

/**
 * Implements hook_popup_styles().
 */
function my_module_popup_styles() {
  return array('no-style' => drupal_get_path('module', 'my_module') . '/tyle');
}

And you must copy / paste the three tpl.php that are requiered (for example from "white" style).

Scheepers de Bruin’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Fixed in v7.13