Closed (fixed)
Project:
Virtual Sites
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2012 at 08:21 UTC
Updated:
7 Mar 2015 at 14:24 UTC
Jump to comment: Most recent
At the "admin/structure/virtual-site/add" page I have the notice:
Notice: Undefined index: theme in virtual_site_theme_feature_form() (line 57 of [...website-path...]/sites/all/modules/virtual_site/theme/virtual_site_theme.module).
Thank you in advance for help.
Comments
Comment #1
djg_tram commentedI have a clear idea about the possible cause but I can't reproduce it on my sites, so I can't really commit it as a fix before that. Could you help by modifying line 57 of virtual_site/theme/virtual_site_theme.module, as referenced in the error message, to:
if (isset($context['theme']) && $context['theme']) {and check what happens? Thanks.
Comment #2
my-family commentedI tried (and cleared cache), but it did not help, the notice is the same.
One correction to the original post - the notice appears at all pages, not only in the VS admin.
Comment #3
djg_tram commentedNow that's really strange. This code is right there on the page when you edit the virtual site and specify the theme. When you re-visit that page, can you see the selected theme appear correctly in the drop-down list?
Comment #4
my-family commentedYes, the selected theme appears and works.
However, various settigs don't work (logo, site name).
One change - the notice now refers to line 99.
Comment #5
djg_tram commentedYes, I tracked it down. These were actually two different problems but I never saw the notices before. Might be related to Drupal version? Now I could reproduce it on a site with the latest. Anyway, I fixed both, hopefully.
Comment #6
willshaman commentedHi, I seem to be getting a similar problem: the Virtual Site looks ok and appears to work properly, but I'm getting an error message on all pages within that VS...
Notice: Undefined index: settings in virtual_site_theme_feature_form() (line 58 of [website path]/sites/all/modules/virtual_site/theme/virtual_site_theme.module).
It was originally line 99, but has now moved to line 58. I'm using the most current version of Drupal: 7.14 and WYSYWIG is the only other module I've installed.
Thanks in advance.
Will
Comment #7
djg_tram commentedDo you use the dev or the 1.0 version? All those lines have safeguards against these notices (not errors, actually) now, so they shouldn't appear.
Comment #8
willshaman commentedI'm using Drupal 7.14 and Virtual Sites 7.x-1.0.
Thanks for checking in.
Will
Comment #9
djg_tram commentedCould you try the dev version? I hope those problems are already fixed there.
Comment #10
willshaman commentedCould you please let me know what's involved switching versions? Is it just a case of replacing Virtual Sites module directory's contents and running update.php? I'm slightly wary of changes that are too experimental as I'm doing this for a third party who's up against a deadline.
Thanks in advance.
Best wishes,
Will
Comment #11
djg_tram commentedIt's a very good habit to check out update.php after module installation and update, yes, but actually, VS (until now) doesn't modify anything in its database table, so it's not really required here. Yes, simply replace the folder contents, that's all. And if you back up the current version first, you can even restore it the same way.
Comment #12
willshaman commentedOK. Replaced 1.0 version with dev version and the messages go away. Both versions seem to work without a hitch (if no one's told you before how good this module is, let me do so now). The only difference appears to be that 1.0 gives red warning messages while dev does not. Hope this helps. Will.
Comment #13
djg_tram commentedYes, thanks. We have another pending issue with themes and caching, as soon as it's resolved, too, I'll create a new stable release.
Comment #14
willshaman commentedGreat. Thanks. Look forward to it.
Comment #15
adamps commentedTidying up - seems to be fixed