Themes

 
 
Picture of Rob Daglish
Plugin is defective or outdated - plugin installed in wrong folder - Error on cloned template
 

Hi All,

I've been trying to create a new moodle theme, so I followed http://docs.moodle.org/dev/Themes_2.2_how_to_clone_a_Moodle_2.2_theme

I cloned the binarius theme from our moodle (V2.3.2+) into the rwptheme folder because it seemed like the one that was closest to the look I was after, edited the version.php file in the new rwptheme folder so the component name was theme_rwp instead of theme_binarius, edited the config.php file to set the theme name to 'rwptheme', renamed theme_binarius.php to theme_rwptheme.php in the lang/en folder, then edited it to change the pluginname to rwptheme, and updated the description to reflect my new theme.

I then put the rwptheme folder on my test moodle (MAMP on my laptop) which is v.2.3.4, and all worked well.  I also tested it on 2.4+ on my MAMP server, so I uploaded it to the live server.

 

When I log in, I get plugin install screen which shows the Plugin Name as rwptheme, and the directory as /theme/rwptheme, but when I click on the upgrade database button, I get the error in the attached screenshot which says:

plugin theme_rwptheme is defective or outdated, can not continue, sorry.

Under debug info, I get:

plugin installed in wrong folder.

Error code detectedbrokenplugin

Stack Trace: line 385 of /lib/upgradelib.php: plugin_defective_exception thrown

line 1524 of /lib/upgradelib.php: call to upgrade_plugins()

line 329 of /admin/index.php: call to upgrade_noncore()

 

I'm a little confused as to why it works OK on 2.3.4 and 2.4+, but doesn't on 2.3.2+ when that's where it came from originally?

I'd upgrade moodle to the 2.4+ version if I could, but our webserver only has PHP v5.3.17 and I can't upgrade that at the moment.

Any help would be very gratefully received!

Rob


 
Average of ratings: -
It's only an avatar...
Re: Plugin is defective or outdated - plugin installed in wrong folder - Error on cloned template
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

Hi,

Reading what you have written above there is some inconsistancy.

Your theme is obviously called theme_rwptheme but you used just rwp on it's own when describing the changes you made. Now this could be a typo in the comment, but if you have done this in the theme then that's probably what's causing the problem. However, this may not be the case. So the only place you could have overlooked is the version.php where you need to change binarius to rwptheme.  This is the place I forget to change more oft than not so you are not alone.

It will be be something in the rename game. so just take your time and check it all again. I guarantee you will kick yourself when you find what you have missed!

Cheers

Mary

 
Average of ratings:Useful (2)
Picture of Rob Daglish
Re: Plugin is defective or outdated - plugin installed in wrong folder - Error on cloned template
 

Hi Mary,

Thanks for that, it was the theme_rwp in version.php - I've obviously picked that up wrong somewhere, and once I corrected it the template loaded fine.

 
Average of ratings: -
It's only an avatar...
Re: Plugin is defective or outdated - plugin installed in wrong folder - Error on cloned template
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

Yipee!

 
Average of ratings: -