0to9Digital / SEO-Lite-Pro

The most powerfull SEO module for ExpressionEngine.
6 stars 6 forks source link

Server Exception when trying to set "Include pagination links in canonical URL output" radio button #12

Closed pyrobob83 closed 1 year ago

pyrobob83 commented 1 year ago

If you try and assign a value to these radio buttons, you get this server error:

Exception Caught SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'y' for column 'include_pagination_in_canonical' at row 1: UPDATEexp_seolite_configSETtemplate= '<title>{title}</title>\n<meta name=\'keywords\' content=\'{meta_keywords}\' />\n<meta name=\'description\' content=\'{meta_description}\' />\n<link rel=\'canonical\' href=\'{canonical_url}\' />',default_keywords= 'science,curriculum,Science Kits,Science Modules,SEPUP,STEM,Lawrence Hall of Science,Next Generation Science',default_description= 'Publishers of middle and high school science curriculum, custom science kits,modules, materials and supplies',default_title_postfix= '',default_og_description= '',default_og_image= '0',default_twitter_description= '',default_twitter_image= '0',include_pagination_in_canonical= 'y' WHEREsite_id` = 1

ee/legacy/database/drivers/mysqli/mysqli_connection.php:114 Stack Trace: Please include when reporting this error

#0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(112): CI_DB_mysqli_connection->query('UPDATE `exp_seo...')
#1 ee/legacy/database/DB_driver.php(260): CI_DB_mysqli_driver->_execute('UPDATE `exp_seo...')
#2 ee/legacy/database/DB_driver.php(175): CI_DB_driver->simple_query('UPDATE `exp_seo...')
#3 ee/legacy/database/DB_active_rec.php(1395): CI_DB_driver->query('UPDATE `exp_seo...')
#4 user/addons/seo_lite/mcp.seo_lite.php(354): CI_DB_active_record->update('seolite_config', Array)
#5 [internal function]: Seo_lite_mcp->save_settings()
#6 ee/ExpressionEngine/Controller/Addons/Addons.php(1577): call_user_func_array(Array, Array)
#7 ee/ExpressionEngine/Controller/Addons/Addons.php(857): ExpressionEngine\Controller\Addons\Addons->getModuleSettings('seo_lite', 'save_settings', Array)
#8 [internal function]: ExpressionEngine\Controller\Addons\Addons->settings('seo_lite', 'save_settings')
#9 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array(Array, Array)
#10 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController(Array)
#11 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
#12 public/admin.php(139): require_once('ee/...')
#12 public/admin.php(139): require_once('ee/...') 

`

and it also wipes all your data filling every setting field to just "0". Using EE7.2.5 and PHP8.1

0to9Digital commented 1 year ago

Hi @pyrobob83

I've tested the "Include pagination links in canonical URL" on PHP version "7.4.3". It works fine on my installation.

Can you check what type of the "exp_seolite_config > include_pagination_in_canonical" field is in the database? It should be "enum('y', 'n')" and not "int".

What version of SEO Lite Pro are you using? And did you update from an older version of SEO Lite? What version was that?

pyrobob83 commented 1 year ago

Sorry for the delay - been meaning to try and get back to you on this for ages, but alas... I couldn't recall where I ran into this and think it may have been on a legacy project where we were upgrading the templates, so could've been anything. Feel free to close it and I'll try and be more responsive if I find anything in future. Thanks!