Favorites Plugin crashes site with first save (1.6.1a and earlier on Dreamhost)

I've had this problem since 1.59 (my first install). On a fresh install of 1.6.1a, I can enable the favorites plugin and it will then show the favorites link and add the favorites buttons. However, as soon as any user selects their first favorite, the site crashes - instantly - on the front end and that user is no longer able to access the site. If you are not that user (such as opening the site in incognito mode in the browser so you're not logged in), the site still works. In reviewing the database, it does seem that the favorite is saved before the crash, as I can find the listing for it via phpMyAdmin under the column "zp_plugin_storage." By clicking "copy" to better view that entry, I can see:

The database entry type is: favorites
The database entry "aux" is: David"
The database entry "data" is" a:2:{s:4:"type";s:6:"images";s:2:"id";s:55:"Parks/Germantown/Germantown Metropark 6-25-2018 (1).jpg";} (which is the picture I added as a favorite)

In viewing the logs in Zenphoto, there seem to be two error entries that are created, both at the same time (same timestamp to the second). They are:

{2716924:Fri, 23 Dec 2022 17:30:45 GMT}

WARNING: mysqli::query(): (HY000/3685): Illegal argument to a regular expression. in /home/(mysite)/zp-core/classes/class-dbmysqli.php on line 69

mysqli->query called from dbMySQLi->query (class-dbmysqli.php [69])
from dbMySQLi->queryFullArray (class-dbmysqli.php [114])
from favorites->__construct (class-favorites.php [29])
from require_once (favoritesHandler.php [312])
from include (index.php [26])
from index.php [79]

{2716924:Fri, 23 Dec 2022 17:30:45 GMT}

USER ERROR: mysqli Error: ( SELECT aux FROM [prefix]plugin_storage WHERE type="favorites" AND aux REGEXP '[[::]]' ) failed. mysqli returned the error Illegal argument to a regular expression. in /home/(mysite)/zp-core/classes/class-dbmysqli.php on line 80

trigger_error called from dbMySQLi->query (class-dbmysqli.php [80])
from dbMySQLi->queryFullArray (class-dbmysqli.php [114])
from favorites->__construct (class-favorites.php [29])
from require_once (favoritesHandler.php [312])
from include (index.php [26])
from index.php [79]

If you see anything that might be a hint, please let me know and I'll test anything you wish. Thanks!

Comments

  • acrylian Administrator, Developer

    That's different than your other issue. I have seen that error before and we had a similar report for 1.6 with favorite. I thought we had fixed that. here the issue is that the regex is empty for some reason making it invalid. Thanks, the error messages help a lot.

Sign In or Register to comment.