Config changes don't always save

Please report bugs here!

Moderator: Thorsten

Post Reply
immewnity
Posts: 6
Joined: Tue Oct 13, 2020 6:11 pm

Config changes don't always save

Post by immewnity » Tue Oct 13, 2020 6:56 pm

Having an odd issue where changes to the configuration (at /admin/?action=config) don't always save... but sometimes they do. For example, I was trying to change the Description field, and it took about five tries for it to stick. Same situation for Contact information, but it took three tries. I haven't noticed any pattern to when it works or doesn't work, other than it seems to take a bit longer to reload the page after it works.

Here's my system info:

Code: Select all

phpMyFAQ Version: 3.0.4
phpMyFAQ API Version: 2.0
Server Software: Apache
Server Document Root: /home3/thepokh7/public_html
phpMyFAQ Installation Path: /home3/thepokh7/public_html/cpdm
PHP Version: 7.3.23
Web server Interface: CGI-FCGI
PHP Extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, readline, Reflection, SPL, session, standard, cgi-fcgi, bcmath, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imap, intl, json, exif, mysqlnd, odbc, PDO, pgsql, Phar, posix, pspell, SimpleXML, soap, sockets, sqlite3, tidy, tokenizer, xml, xmlwriter, xsl, zip, mysqli, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, wddx, xmlreader, xmlrpc, imagick, ionCube Loader
PHP Session path: /var/cpanel/php/sessions/ea-php70
Database Server: mysqli
Database Server Version: 5.6.41-84.1
Database Client Version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
Elasticsearch Version: n/a
And here's an example of the debug text on a failed save attempt (in this case, to update the Description field):

Code: Select all

DEBUG INFORMATION:
/home3/thepokh7/public_html/cpdm/src/Bootstrap.php:
phpMyFAQ\Configuration->getAll() in line 140: SELECT config_name, config_value FROM faqconfig
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/User/CurrentUser.php:
phpMyFAQ\User->getUserByCookie() in line 549: SELECT user_id, login, account_status FROM faquser WHERE remember_me = '6aa2c73b1522c58434a6306aba3ad7c9c2b65fd5' AND account_status != 'blocked'
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/User.php:
phpMyFAQ\User\UserData->load() in line 355: SELECT last_modified, display_name, email FROM faquserdata WHERE user_id = 1
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/User/CurrentUser.php:
phpMyFAQ\User\CurrentUser->updateSessionId() in line 556: UPDATE faquser SET session_id = '93567d6a5715ec85a750461ea1ab55bc', session_timestamp = 1602610951, last_login = '20201013194231', ip = 'xxx.xxx.xxx.xxx [actual IP removed for security purposes]' WHERE user_id = 1
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Permission/BasicPermission.php:
phpMyFAQ\Permission\BasicPermission->getUserRights() in line 248: SELECT fr.right_id AS right_id FROM faqright fr, faquser_right fur, faquser fu WHERE fr.right_id = fur.right_id AND fu.user_id = 1 AND fu.user_id = fur.user_id
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Helper/AdministrationHelper.php:
phpMyFAQ\Permission\BasicPermission->getAllRightsData() in line 131: SELECT right_id, name, description, for_users, for_groups, for_sections FROM faqright ORDER BY right_id ASC
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Permission/BasicPermission.php:
phpMyFAQ\Permission\BasicPermission->getUserRights() in line 248: SELECT fr.right_id AS right_id FROM faqright fr, faquser_right fur, faquser fu WHERE fr.right_id = fur.right_id AND fu.user_id = 1 AND fu.user_id = fur.user_id
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Permission/BasicPermission.php:
phpMyFAQ\Permission\BasicPermission->getUserRights() in line 248: SELECT fr.right_id AS right_id FROM faqright fr, faquser_right fur, faquser fu WHERE fr.right_id = fur.right_id AND fu.user_id = 1 AND fu.user_id = fur.user_id
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Permission/BasicPermission.php:
phpMyFAQ\Permission\BasicPermission->getUserRights() in line 248: SELECT fr.right_id AS right_id FROM faqright fr, faquser_right fur, faquser fu WHERE fr.right_id = fur.right_id AND fu.user_id = 1 AND fu.user_id = fur.user_id
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/User.php:
phpMyFAQ\User\UserData->get() in line 937: SELECT display_name FROM faquserdata WHERE user_id = 1
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Permission/BasicPermission.php:
phpMyFAQ\Permission\BasicPermission->getUserRights() in line 248: SELECT fr.right_id AS right_id FROM faqright fr, faquser_right fur, faquser fu WHERE fr.right_id = fur.right_id AND fu.user_id = 1 AND fu.user_id = fur.user_id
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Permission/BasicPermission.php:
phpMyFAQ\User->getUserById() in line 149: SELECT user_id, login, account_status, is_superadmin FROM faquser WHERE user_id = 1 AND account_status != 'blocked'
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/User.php:
phpMyFAQ\User\UserData->load() in line 919: SELECT last_modified, display_name, email FROM faquserdata WHERE user_id = 1
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Permission/BasicPermission.php:
phpMyFAQ\Permission\BasicPermission->getRightId() in line 156: SELECT right_id FROM faqright WHERE name = 'editconfig'
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Permission/BasicPermission.php:
phpMyFAQ\Permission\BasicPermission->checkUserRight() in line 159: SELECT fr.right_id AS right_id FROM faqright fr, faquser_right fur, faquser fu WHERE fr.right_id = 17 AND fr.right_id = fur.right_id AND fu.user_id = 1 AND fu.user_id = fur.user_id
A successful attempt has all of this in it as well (with different values for session ID of course) with this afterwards:

Code: Select all

/home3/thepokh7/public_html/cpdm/admin/configuration.php:
phpMyFAQ\Configuration->update() in line 84: UPDATE faqconfig SET config_value = 'true' WHERE config_name = 'main.maintenanceMode'
/home3/thepokh7/public_html/cpdm/admin/configuration.php:
phpMyFAQ\Configuration->update() in line 84: UPDATE faqconfig SET config_value = 'language_en.php' WHERE config_name = 'main.language'
... (other UPDATE faqconfig lines) ...
/home3/thepokh7/public_html/cpdm/admin/configuration.php:
phpMyFAQ\Configuration->update() in line 84: UPDATE faqconfig SET config_value = 'true' WHERE config_name = 'spam.enableSafeEmail'
/home3/thepokh7/public_html/cpdm/admin/configuration.php:
phpMyFAQ\Configuration->update() in line 84: UPDATE faqconfig SET config_value = 'true' WHERE config_name = 'spam.manualActivation'
/home3/thepokh7/public_html/cpdm/src/phpMyFAQ/Configuration.php:
phpMyFAQ\Configuration->getAll() in line 204: SELECT config_name, config_value FROM faqconfig

Thorsten
Posts: 15105
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Config changes don't always save

Post by Thorsten » Wed Oct 14, 2020 6:14 am

Hi,

do you see any errors in the browser dev tools? The queries are looking okay.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

immewnity
Posts: 6
Joined: Tue Oct 13, 2020 6:11 pm

Re: Config changes don't always save

Post by immewnity » Wed Oct 14, 2020 8:16 pm

Thorsten wrote:
Wed Oct 14, 2020 6:14 am
Hi,

do you see any errors in the browser dev tools? The queries are looking okay.

bye
Thorsten
Nothing that seems like it'd be problematic - a bunch of

Code: Select all

Cookie “pmf_rememberme” will be soon treated as cross-site cookie against “(mostly css/js files)” because the scheme does not match.
and a few instances of

Code: Select all

Cookie “PHPSESSID” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
All are just "warnings" and not errors. (this is in Firefox - right now, it seems to be working properly in Chrome, though it was failing the other day)

Thorsten
Posts: 15105
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Config changes don't always save

Post by Thorsten » Wed Oct 14, 2020 9:09 pm

Hi,

I fixed the cookie security warnings for 3.0.5 and 3.1.0-alpha.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply