Closed (fixed)
Project:
Popup
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2012 at 08:52 UTC
Updated:
20 Dec 2013 at 21:25 UTC
Jump to comment: Most recent
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
Comment #1
tommann commentedI am having the same issue, any thoughts?
Comment #2
Anonymous (not verified) commentedSame issue for me too. A patch would be great. :)
Comment #3
Scheepers de Bruin commentedI 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...
Comment #4
Sean-Khan commentedI'm getting errors in 1.0 and dev both.
Comment #5
Peter223 commentedI'm getting this error as well! There are 10 or more of these errors inside the popup options.
Comment #6
jlongbottom commentedme too
EDIT:
OK heres a crappy temporary solution (it at least removes the error messages)
replace line 292 with these 2 lines:
Comment #7
jay.lee.bio commentedThanks for sharing the temporary solution.
Comment #8
Greg J. Smith commentedI'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.
Comment #9
Scheepers de Bruin commentedThanks all, fixed in new release
Comment #10
restyler commentedit's still there in 1.2 release which was released after your message.
Comment #11
Greg J. Smith commentedI'm still getting this error message in 1.2 as well.
Comment #12
motomc commentedI've just installed and have the same error too
Comment #13
manys commentedStill there
http://i.imgur.com/4iMPj.png
Comment #14
thoughtcat commentedI am getting this in the latest release. Not a vanilla install though.
Comment #15
sreese commentedI am also getting this error with the latest release. The exact same message as seen in #13 above.
Comment #16
sreese commentedA 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.
Comment #17
sreese commentedComment #18
nicholsonma commentedI'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....
Comment #19
rajmataj commentedI 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
Comment #20
Julien Vidal commentedI'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
Comment #21
davidcsonka commentedI can confirm that the problem went away after I selected a style in the Popup Global Settings tab. Nice detective work Vidal!
Comment #22
Anonymous (not verified) commentedWhat if you want to select No style? What is the solution for this option? Apparently this is still a bug.
Comment #23
eme commentedIn the meantime, if you don't want to hack the module, you can user hook_popup_style and define your own "no style" popup.
And you must copy / paste the three tpl.php that are requiered (for example from "white" style).
Comment #24
Scheepers de Bruin commentedFixed in v7.13