Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Undefined array key "var" with Domain Theme submodule #43

Open
stpaultim opened this issue Nov 7, 2024 · 4 comments
Open

Warning: Undefined array key "var" with Domain Theme submodule #43

stpaultim opened this issue Nov 7, 2024 · 4 comments
Labels
type - bug report Something isn't working

Comments

@stpaultim
Copy link
Member

stpaultim commented Nov 7, 2024

Warning: Undefined array key "var" in domain_theme_settings_submit() (line 305 of /var/www/html/modules/domain/domain_theme/domain_theme.admin.inc).

Getting this error when trying to assign a theme to a specific domain with the domain_theme sub-module enabled. The modules works, but generates this warning.

@stpaultim
Copy link
Member Author

This is another warning that may be related.

Warning: Undefined array key "favicon_upload" in domain_theme_file_upload() (line 404 of /var/www/html/modules/domain/domain_theme/domain_theme.admin.inc).

@yorkshire-pudding yorkshire-pudding added the type - bug report Something isn't working label Nov 8, 2024
@stpaultim
Copy link
Member Author

stpaultim commented Nov 8, 2024

@sudipto68 and I were looking at these errors tonight and determined that they did not come up during some basic use of the module.

To recreate these errors, I had to assign both domains the Basis theme and then use the Color Module to change the header color. This triggered these specific errors.

I'm not sure I could consider these "Warnings" to block a beta release.

Once again, even in these conditions, the module works as expected, other than generating these warnings.

@izmeez
Copy link
Contributor

izmeez commented Nov 12, 2024

My testing of the domain_theme submodule yields failures and successes.

Steps: On the default domain enable themes that may be used at /admin/appearance/list. Go to the domain list at /admin/structure/domain/view. Choose a subdomain, click on Edit domain and click on tab menu item Theme. A different theme can be selected and then click Set domain theme. This works and the new theme shows for the chosen subdomain without displaying errors or warnings on php 7.4.x

However, efforts to configure a theme, such as changing the header color in basis, fail using the above process or alternatively:

Go to a subdomain url. Go to appearance and click on settings for theme. A notice warns to use the url for the specific subdomain /admin/structure/domain/view/3/theme/basis/theme-settings. Click on suggested url. Then modify the theme, eg, header color. Note: the submit button says: Save Theme Settings. When user clicks on this, in our case, 3 warnings are displayed:

Notice: Undefined index: logo_upload in domain_theme_file_upload() (line 397 of \modules\domain\domain_theme\domain_theme.admin.inc).
Notice: Undefined index: favicon_upload in domain_theme_file_upload() (line 404 of \modules\domain\domain_theme\domain_theme.admin.inc).
Notice: Undefined index: var in domain_theme_settings_submit() (line 305 of \modules\domain\domain_theme\domain_theme.admin.inc).

AND the screen shows a list of themes and the submit button at the bottom says: Set domain theme as with previous method above. Whether or not user clicks on that submit button, returning to the site shows the change has not taken effect.

So I am not able to replicate your findings as described.

I have only enabled the domain and domain_theme modules. Maybe, you also have the domain_settings module enabled?

@izmeez
Copy link
Contributor

izmeez commented Nov 12, 2024

Possibly, the reason for the differences in my findings are because I had already applied the fix in #39 and the PR #46.

@yorkshire-pudding yorkshire-pudding changed the title Warning: Undefined array key "var" Warning: Undefined array key "var" with Domain Theme submodule Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type - bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants