Installed Background images in D7 and followed instructions from README. When firing up the Admin/content/background images I get the notice that there is an undefined variable: note_options in bg_image_node_options() line 385 of .....\bg_image.module

Any suggestions where to look/what to do?

I am newbie in D7/PHP/HTML but started coding back in 1976 (!) in assembler to end (before this) with writing C# and object oriented code. In the 'grey brigade' nowadays but alive and kickin.

CommentFileSizeAuthor
#4 bg_image.jpg172.13 KBbobup

Comments

drclaw’s picture

Hmm... I'll take a look at this... looks like a spelling error =/

Thanks for the report!

drclaw’s picture

Status: Active » Closed (cannot reproduce)

I can't reproduce the error. The spelling error maybe existed in an older version of bg_image... try downloading the latest recommended release and see if you're still getting the error.

Thanks!
drclaw

PS: PHP should be no problem if you're coming from some flavour of C!

jspaens’s picture

OK. I'll give it a try, but I downloaded very recently so I guess it WAS the most recent version. For the moment the issue has no priority, struggling to get upto speed with the (rather challenging) new environment.

Keep IT up!

bobup’s picture

StatusFileSize
new172.13 KB

I also am getting an error very similar to the summary above, with a slight spelling change. Here is what I'm getting:

Notice: Undefined variable: node_options in bg_image_node_options() (line 397 of /Users/bobup/Desktop/drupal-7.14/sites/all/modules/bg_image/bg_image.module).

(--> note that the undefined variable is "node_options", not "note_options" as stated in the summary above.)
See attached image.

I'm running D7 and Background Image 7.x-1.0-beta3+1-dev. When clicking on the "Background Images" tab on the Content page I get the above error, and even though I set up a background image node, the selector on this page is empty.

For context, line 397 of the module says:
if (!$node_options) {

I have the following modules installed and enabled: Background Image, Background Image Context, Background Image UI, Context and Context UI.

Is there something else I should install/enable? Thanks for your help!

drclaw’s picture

Status: Closed (cannot reproduce) » Active

Hi, Have you created any actual background image nodes?

Regardless, it looks like an error that still needs to be fixed. I'll take a look and report back.

bobup’s picture

>>> Hi, Have you created any actual background image nodes?
Yes. Here is what I did:
Created content type "bgimage". Created a field for that type named "bgimage_field", type "image".
In Configuration >> Background Image I set the Node Type to "bgimage" and the Node Field to "bgimage_field".
Then on the Content page I click on the "Background Images" tab and get the error.

drclaw’s picture

That all sounds correct as far as the configuration is concerned, but have you actually created any bgimage content?

bobup’s picture

Ahhh - that was the clue I was missing. I knew it was something stupid on my part. Thanks!

drclaw’s picture

No worries. The error message still needs to be fixed anyway. Maybe I'll print a message that suggests adding at least one node before you can assign a background image.

drclaw’s picture

Status: Active » Fixed

I've fixed the error message and committed. There should be a new release candidate release out sometime in the near future!

Status: Fixed » Closed (fixed)

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