Deactivation of Phoca Gallery broke down other compoments and modules

Phoca Gallery - image gallery extension
RadekS
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 23 Jan 2019, 09:35

Deactivation of Phoca Gallery broke down other compoments and modules

Post by RadekS »

Please advise if you ever solved ...
When I deactivated the Phoca Gallery component in my administration, Joomla wrote me a "PLG_PHOCAGALLERY_COMPONENT_NOT_INSTALLED" message.
Since then, Joomla doesn't let me Manage the Extensions, so I can't re-enable it, the same message always appears. It allows me only to Install extensions, but when I try to install Phoca Gallery again (online or as a package), it lists "404 Component not found".
Since then, the administration can not work with Modules, Control panel, but also with Articles. I can only work with Menus and some Components.
The message "PLG_PHOCAGALLERY_COMPONENT_NOT_INSTALLED" also appears to people on the site where the articles are normally shown. The menu is OK but the content section of the site stopped showing.
Can be Phoca Gallery enabled again manually somewhere in the DB or configuration file? Or can I uninstall it without Extension Manager? Or another solution?
Thank you in advance!
christine
Phoca Hero
Phoca Hero
Posts: 2938
Joined: 28 Nov 2010, 17:20

Re: Deactivation of Phoca Gallery broke down other compoments and modules

Post by christine »

Hi RadekS,

just tested and have the same result(s) .... To solve this, I think it's only possible via phpMyAdmin to activate and/or deactive extensions. I hv informed Jan about. Thanks for info & understanding.

Kind regards
Christine
christine
Phoca Hero
Phoca Hero
Posts: 2938
Joined: 28 Nov 2010, 17:20

Re: Deactivation of Phoca Gallery broke down other compoments and modules

Post by christine »

Hi RadekS,

until Jan has solution, you could do following at the moment: I made:

a) via FTP: I renamed: plugins/content/phocagallery to e.g.: /phocagalleryold
b) I changed this:

Code: Select all

if (!JComponentHelper::isEnabled('com_phocagallery', true)) {
    return JError::raiseError(JText::_('PLG_CONTENT_PHOCAGALLERY_ERROR'), JText::_('PLG_CONTENT_PHOCAGALLERY_COMPONENT_NOT_INSTALLED'));
}
to this:

Code: Select all

if (!JComponentHelper::isEnabled('com_phocagallery', true)) {
    JFactory::getApplication()->enqueueMessage('here text', 'error');
    return;
}
c) checked, if the extensions modules etc. are OK. backend & frontend were OK. Except gallery. It showed:
component not found - but all other menus were working again.

d) also tested: activated in backend the phocagallery component (as it was de-activated).

e) Now everything works.

Above just for the moment, to get site again working.

Kind regards
Christine
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Deactivation of Phoca Gallery broke down other compoments and modules

Post by Jan »

Hi, Phoca Gallery is a content plugin, which means it runs only in article (com_content) or in places where it is allowed to run content plugins.

Even in manage extensions it only displays warning.

Normally, in Joomla! administration there is nothing which displays content plugin so you can normally run other tasks, see:

Image

Even Phoca Gallery is not installed anymore, the plugin does not have any influence on administration website as it only runs in article :idea: and it display only a warning in extension manager. :idea:

So question should be, do you run some part in your administration which runs in all administration and uses content plugins?

As you can see, I am able to disable the plugin in extension manager :idea:

Which version of Joomla! and Phoca Gallery do you run?

Jan
If you find Phoca extensions useful, please support the project
RadekS
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 23 Jan 2019, 09:35

Re: Deactivation of Phoca Gallery broke down other compoments and modules

Post by RadekS »

Thanks a lot Christine and Jan!
I've enabled Phoca Gallery again but I had to do it via phpMyAdmin. There is the table named prefix_extensions, where I found the row with name="com_phocagallery" and changed value from enabled=0 to enabled=1. Since then Administration and Website work again.
As I see, the solution is to Uninstall the component but not to Disable it ;-)
I have Joomla! 3.8.13 and Phoca Gallery 4.3.10.
christine
Phoca Hero
Phoca Hero
Posts: 2938
Joined: 28 Nov 2010, 17:20

Re: Deactivation of Phoca Gallery broke down other compoments and modules

Post by christine »

Hi RadekS,
RadekS wrote: 24 Jan 2019, 20:03 I've enabled Phoca Gallery again but I had to do it via phpMyAdmin. There is the table named prefix_extensions, where I found the row with name="com_phocagallery" and changed value from enabled=0 to enabled=1. Since then Administration and Website work again.
That means, that you have enabled phocagallery component again.
As I see, the solution is to Uninstall the component but not to Disable it ;-)
No. Uninstall any component, if you want to have it removed.

But: If you de-install e.g. Phoca Gallery, you will lose your gallery/images!

Generell information now: If you want to UPDATE, then download actual package: https://www.phoca.cz/download/category/ ... -component and install it via the normal installation routine.
Or: when update server is present/activated from developer, than you will get update info in backend.

About the previous "de-activate" problem, the reason for this, is written in 2nd post.
I have Joomla! 3.8.13 and Phoca Gallery 4.3.10.
FYI: Current Joomla version is: 3.9.2 > https://www.joomla.org/announcements.html

Kind regards
Christine
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Deactivation of Phoca Gallery broke down other compoments and modules

Post by Jan »

RadekS wrote: 24 Jan 2019, 20:03 I have Joomla! 3.8.13 and Phoca Gallery 4.3.10.
I need to exactly know which version of plugin and which version of component do you use?

Do you use any other Phoca Gallery extension?

Testing on different servers, I don't get such problem because only warning should be displayed:

Code: Select all

if (!JComponentHelper::isEnabled('com_phocagallery', true)) {
	return JError::raiseError(JText::_('PLG_CONTENT_PHOCAGALLERY_ERROR'), JText::_('PLG_CONTENT_PHOCAGALLERY_COMPONENT_NOT_INSTALLED'));
}
which means, it should not break the script and only raise the warning.

My idea why it could somehow happen is, there is some obsolete version of plugin or there is some system plugin in your Joomla! or some specific extension which somehow change the behaviour of raiseWarning. RaiseWarning should just not STOP the script so you should be able to edit everything possible in your Joomla!


I am now preparing version Phoca Gallery 4.3.11, so I will try to change the Joomla! raiseWarning method to echo only a string (so this should all OK)
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Deactivation of Phoca Gallery broke down other compoments and modules

Post by Jan »

Now, in version 4.3.11 it should behave completely different, so there should not be such problem:


https://www.phoca.cz/news/1003-phoca-ga ... 1-released

Jan
If you find Phoca extensions useful, please support the project
Post Reply