Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't save the global setting #187

Open
mckillo opened this issue Oct 1, 2024 · 6 comments
Open

Don't save the global setting #187

mckillo opened this issue Oct 1, 2024 · 6 comments

Comments

@mckillo
Copy link
Contributor

mckillo commented Oct 1, 2024

I have installed last Jcomments v.4.0.33 in Joomla 5.1.4 with php 8.2 and with old Jcomments tables (the old Jcomments v.3.x was uninstalled with migration to J5 but the Jcomments tables weren't deleted).

[BE] Go to JComments - Settings - Layout - Comment from and change these fields:

image

When I save the setting, I don't have any error and the setting doesn't save and have the default setting.

Does the Jcomments 4.x installer script migrate the old Jcomments tables, so that the old comments aren't lost, or should I assume that the old comments will be removed and I need to delete the old tables?"

@mckillo
Copy link
Contributor Author

mckillo commented Oct 1, 2024

I test it without old table, I have the same issue, don't save the setting. I'll try to debug it.

@Globulopolis
Copy link
Collaborator

In the newer versions all component settings stored in #__extensions table. Save settings action is now processed by Joomla com_config.

Yes, try to debug. Turn on Joomla logging and php logs. As one step in debug try to disable Extension - JComments plugin and let me now about result.

@mckillo
Copy link
Contributor Author

mckillo commented Oct 1, 2024

This afternoon I had time to debug for a while. I don't know why, but in \administrator\components\com_jcomments\models\settings.php line57 read the params of component:

$params = ComponentHelper::getComponent('com_jcomments')->getParams();

And the $params load previous value of "author_homepage":"0", when in the params in the extension, this field is "author_homepage":"1". After reading for a few minutes it's right. Any cache? No idea

I test it with:

$params = ComponentHelper::getParams('com_jcomments');

The result is the same.

I hadn't seen before that a getParams would return the previous value instead of the saved one. I'll keep investigating because I need this to be stable. Very strange.

@Globulopolis
Copy link
Collaborator

I will look at this issue when I have free time. But I strongly recommend to use Joomla com_config.
Go to Global settings and select Jcomments from the list on the left.

@exstreme
Copy link
Owner

exstreme commented Oct 2, 2024

Did you check database for errors and repair with standard Joomla tools?

@mckillo
Copy link
Contributor Author

mckillo commented Oct 4, 2024

Yes, nothing, all's right, any errors.
I have tested several Joomla 5 (in local and server), the same issue, save setting and when load the page, I don't see the changes. I wait a few minutes, I can see the saved settings in the view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants