Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
i get this errors if i open "admin/build/themes/settings/mytheme" if i only have mytheme_settings()
function implemented.
notice: Undefined property: stdClass::$prefix in C:\Inetpub\wwwroot\drupal6\modules\system\system.admin.inc on line 480.
Additional there is another documentation bug at http://drupal.org/node/132442 (Custom theme settings). There is written i can use phptemplate_settings()
function, but this doesn't work as it does in Theme Settings API 5.x and produce an additional error. Code looks like this should be named phptemplate_engine_settings()
, but this isn't working and gives errors, too.
notice: Undefined property: stdClass::$prefix in C:\Inetpub\wwwroot\drupal6\modules\system\system.admin.inc on line 491.
Comments
Comment #1
JohnAlbinThe documentation is correct. A theme should use
phptemplate_settings()
. Only Theme Engines (like the PHPTal theme engine or Smarty theme engine) should useENGINE_engine_settings()
.If the code doesn’t work as the docs say they should then its a bug in the code, not the docs.
I’m on the verge of being out of town for 4 days, but I’ll look at this as soon as I can.
Comment #2
hass CreditAttribution: hass commentedUp's... i found something :-(. It looks like i missed to set
engine = phptemplate
in mytheme.info file... now the errors seems gone.We should re-think if you shouldn't add a helpful error message in such cases.
Comment #3
JohnAlbinYes, a decent error message would help tremendously. Also, we should make sure that old school, "plain php" templates still work with the updated API.
Comment #4
JohnAlbinPlain php themes work fine. I added some test settings to chameleon and didn’t receive any errors.
Do we really need to set an error message if the theme author screws up their .info file?
Comment #5
hass CreditAttribution: hass commentedNot sure, but the error is very strange and you don't get an idea that missing engine is the cause of this error message.
I'm sure more themer's or theme upgrader's will have this problem, too. Maybe enough if we are more clear in "Themes now have .info files" section in the update handbook that this line is a MUST for phptemplate and not only a "should set it as phptemplate", what i have simply "skipped" and thought phptemplate is default engine since 4.7.x and therefor the value should defaults to phptemplate engine :-).
Comment #6
chx CreditAttribution: chx commentedComment #7
chx CreditAttribution: chx commentedComment #8
add1sun CreditAttribution: add1sun commentedI added the "required" info to the updating themes page and put some basics on the .info handbook page (http://drupal.org/node/137062) so that it is clear engine is required.
I don't know that an error message is required for this. I'm marking this fixed but if someone wants to pursue error message they should reopen and move the issue to Drupal, not Docs.
Comment #9
(not verified) CreditAttribution: commented