Jump to content

PW 3 error with admin theme Modesta


mrkhan
 Share

Recommended Posts

Hello,

i am trying to use PW 3 and its look great with option of online editing.

but i am having issue with installing admin theme Modesta.

when i try to install admin theme i got error 

Fatal error: Class 'InputfieldWrapper' not found in /Applications/XAMPP/xamppfiles/htdocs/ProcessWire/site/templates-admin/init.php on line 11

with few other files but i manage the issue by replacing the 

<?php to <?php namespace ProcessWire;

in every file, 

i want to know does its necessary to change and if not how to fix that without manually changing all files.

second now i am getting error which i could't solve 

admin load properly but when i goto pages i could't see any page

and after changing 

$config->debug = true; in config.php file

i got this error

Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/ProcessWire/site/templates-admin/AdminThemeModestaHelpers.php on line 73

when i see bellow is code

return $this->wire('adminTheme')->modestaSitename;

and same error is in few other lines too.

how to fix the issues and make theme working with PW 3

Thanks

Link to comment
Share on other sites

@mrkhan, Modesta only shows compatibility with PW versions up to 2.4, so I'm not sure there will be an easy solution to use it with PW3 or 2.7 for that matter. There have been significant changes to admin themes between the last few 2.x versions and to my knowledge only the themes included with the core are working for 2.7 and 3.0. Though if you do manage to get it working, you may want to submit a PR to the author of the Modesta theme. I think you are on the right track with adding "namespace ProcessWire;" to the top of all the PHP files. This is something that will be necessary for an admin theme to support PW3 (unlike other modules).

I think the reason you are getting the "trying to get property of non object" error is because Modesta is an admin theme module, rather than an older style admin theme. That means it would need to live in /site/modules/AdminThemeModesta/ and not in /site/templates-admin/. I can see from the error message that you've got it in /site/templates-admin/ rather than in /site/modules/. 

An alternative is that you may want to consider creating a custom color theme for the Reno admin, as we know the Reno admin theme supports everything in the current 2.7/3.0, but we don't know if Modesta does, even if you can get it working. 

Link to comment
Share on other sites

@mrkhan, Modesta only shows compatibility with PW versions up to 2.4, so I'm not sure there will be an easy solution to use it with PW3 or 2.7 for that matter. 

Modesta actually works quite nicely with 2.7.2, as long as you install the latest version as an admin theme module. The issue with 3.x needs a bit more debugging.

Link to comment
Share on other sites

Modesta actually works quite nicely with 2.7.2, as long as you install the latest version as an admin theme module. The issue with 3.x needs a bit more debugging.

I think it only works to a certain extent. Modesta hasn't been updated to support many of the new features in the admin panel. That said, the 'base' of the module works.

Link to comment
Share on other sites

Okay if it works with 2.7.2 then it can be made to work with PW3. I installed it to take a closer look at what the issue was, and it came down to that PW3 doesn't support compiled admin themes at all. I'd forgotten that. I've updated PW3 to support compiled admin themes that live in /site/modules/, and that's now committed to the devns branch. Testing with AdminThemeModesta, it seems to work just fine. Though there's lots missing from AdminThemeModesta in terms of current feature support, so I'm not sure I'd recommend using it, but it should work now if you want it. 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...