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

djg_tram’s picture

I 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.

my-family’s picture

I 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.

djg_tram’s picture

Now 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?

my-family’s picture

Yes, the selected theme appears and works.

However, various settigs don't work (logo, site name).

One change - the notice now refers to line 99.

djg_tram’s picture

Yes, 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.

willshaman’s picture

Hi, 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

djg_tram’s picture

Do 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.

willshaman’s picture

I'm using Drupal 7.14 and Virtual Sites 7.x-1.0.

Thanks for checking in.

Will

djg_tram’s picture

Could you try the dev version? I hope those problems are already fixed there.

willshaman’s picture

Could 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

djg_tram’s picture

It'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.

willshaman’s picture

OK. 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.

djg_tram’s picture

Yes, thanks. We have another pending issue with themes and caching, as soon as it's resolved, too, I'll create a new stable release.

willshaman’s picture

Great. Thanks. Look forward to it.

adamps’s picture

Issue summary: View changes
Status: Active » Fixed

Tidying up - seems to be fixed

Status: Fixed » Closed (fixed)

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