# \[Help\] OJS malfunctioning after removeing the theme folder

**URL:** <https://forum.pkp.sfu.ca/t/help-ojs-malfunctioning-after-removeing-the-theme-folder/3753>\
**Category:** Software Support\
**Tags:** ojs\
**Created:** [August 26, 2015, 10:04pm UTC](https://forum.pkp.sfu.ca/t/help-ojs-malfunctioning-after-removeing-the-theme-folder/3753 "2015-08-26T22:04:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dani](https://forum.pkp.sfu.ca/letter_avatar/dani/32/5_5575768a8748004e209b776fc1b2916d.png) [@Dani](https://forum.pkp.sfu.ca/u/Dani)\
**Post date:** [August 26, 2015, 10:04pm UTC](https://forum.pkp.sfu.ca/t/help-ojs-malfunctioning-after-removeing-the-theme-folder/3753/1 "2015-08-26T22:04:38Z")

</div>

Dears,

I set the OJS theme to a new theme (themeX) in the ojs/manager/setup/5 and also in the ojs/admin/settings.  
It was working fine.

Then I was trying to update the theme, for that, I deleted the themeX folder from the ojs/plugins/themes folder, and instead created a fresh new folder under the same name (themeX), and put the updated theme files there.

After that, OJS is not working properly, i…e I cannot open pages: ojs/manager/setup/5 and page ojs/admin/settings to modify the look of the journal anymore. On accesing these two pages, nothing shows at all, just a blank page. Everything else (as far as I can tell) is working properly. I can even access other setup pages, such as ojs/manager/setup/4.

I tried clearing the data cache and the theme cache from the admin menue. but it did not help.

I have a backup of the server (not the OJS). How can I correct this issue? Should I restore the OJS files? Which folder? Or should I restore the OJS database? how?

OJS version 2.4.5.0

Thanks.

[edit] I also noticed that the page ojs/manager/plugins is also not accessible.

---

<div class="post-metadata">

**Author:** ![ctgraham](https://forum.pkp.sfu.ca/user_avatar/forum.pkp.sfu.ca/ctgraham/32/5992_2.png) [@ctgraham](https://forum.pkp.sfu.ca/u/ctgraham)\
**Post date:** [August 27, 2015, 12:19pm UTC](https://forum.pkp.sfu.ca/t/help-ojs-malfunctioning-after-removeing-the-theme-folder/3753/2 "2015-08-27T12:19:40Z")

</div>

There is probably a PHP error in your new theme. You’ll want to look in your error logs to see where it is failing. See this FAQ:

> [@When I click some button or follow some link, I'm left with a blank page. What do I do?](http://forum.pkp.sfu.ca/t/when-i-click-some-button-or-follow-some-link-im-left-with-a-blank-page-what-do-i-do/898):
>
> Check your webserver error log Usually, this indicates that a PHP error has occurred and the message has been sent to your web server or system log file. Check there – e.g. /var/log/apache/error.log, although the exact location will depend on your server configuration – for further details. Check your file permissions If you haven’t installed OJS yet, then the most likely cause is a problem with file permissions in your cache/ or cache/t\_compile directories. See docs/README for information on…

Restoring the original theme files probably will get you up and running again quickly if desired; it’s unlikely there’s any database restore needed at this point.

---

<div class="post-metadata">

**Author:** ![Dani](https://forum.pkp.sfu.ca/letter_avatar/dani/32/5_5575768a8748004e209b776fc1b2916d.png) [@Dani](https://forum.pkp.sfu.ca/u/Dani)\
**Post date:** [August 27, 2015, 1:33pm UTC](https://forum.pkp.sfu.ca/t/help-ojs-malfunctioning-after-removeing-the-theme-folder/3753/3 "2015-08-27T13:33:16Z")

</div>

Thanks for reply.

No the theme is fine. I was using it before with no problem, and even now it is working fine in rest of the pages.

the error log reads as: “PHP Fatal error: Cannot redeclare class themeXThemePlugin”.

I guess it was a permission error.  
anyway, I restored a previous backup of the ojs folder and the problem was solved.

---

<div class="post-metadata">

**Author:** ![ctgraham](https://forum.pkp.sfu.ca/user_avatar/forum.pkp.sfu.ca/ctgraham/32/5992_2.png) [@ctgraham](https://forum.pkp.sfu.ca/u/ctgraham)\
**Post date:** [August 27, 2015, 1:47pm UTC](https://forum.pkp.sfu.ca/t/help-ojs-malfunctioning-after-removeing-the-theme-folder/3753/4 "2015-08-27T13:47:29Z")

</div>

The PHP error indicates that OJS was finding two classes identically named as “themeXThemePlugin”. This could occur if the original theme was still present in another folder.

---

<div class="post-metadata">

**Author:** ![Dani](https://forum.pkp.sfu.ca/letter_avatar/dani/32/5_5575768a8748004e209b776fc1b2916d.png) [@Dani](https://forum.pkp.sfu.ca/u/Dani)\
**Post date:** [August 27, 2015, 4:07pm UTC](https://forum.pkp.sfu.ca/t/help-ojs-malfunctioning-after-removeing-the-theme-folder/3753/5 "2015-08-27T16:07:20Z")

</div>

Can it be that the themeX folder was also in the cache folder and hence causing the error?  
if yes, how can I clean cache in the future?  
I tried deleting the cache folder, but it crashed OJS completely.

I tried CLEAR DATA and CLEAR CACHE options from within the ojs, but it did not help in the case of this issue.

---

<div class="post-metadata">

**Author:** ![ctgraham](https://forum.pkp.sfu.ca/user_avatar/forum.pkp.sfu.ca/ctgraham/32/5992_2.png) [@ctgraham](https://forum.pkp.sfu.ca/u/ctgraham)\
**Post date:** [August 27, 2015, 5:14pm UTC](https://forum.pkp.sfu.ca/t/help-ojs-malfunctioning-after-removeing-the-theme-folder/3753/6 "2015-08-27T17:14:51Z")

</div>

I’m not aware of any native functionality that would create a copy of the class in the cache directory.

To find the offending file(s) if this were to happen again, use a search tool such as grep to look for the duplicate class definitions:  
`grep -r 'class themeXThemePlugin extends ThemePlugin' plugins/themes/`

Using the options in OJS to clear the cache is appropriate. If you were to run across a situation where you needed to clear the cache without access to the UI, you could remove the files from the cache directory and subdirectories, leaving the directory structure intact.
