It's now available: https://www.zen-cart.com/downloads.php?do=file&id=2264
Printable View
It's now available: https://www.zen-cart.com/downloads.php?do=file&id=2264
Hi lat9,
I'm writing up my script for installing/reinstalling the plugin, and notice that the documentation and the actual files still do not match: one of the intended files is not included in the documentation (JScript file), and three other files do not have matching names.
I suspect the init files should have an init_, and the documentation for the template_default files should probably have the _default that the actual file has.
- /includes/classes/observers/auto.news_box_manager_metatags.php (Added in v2.2.0)
- /includes/extra_datafiles/news_box_file_database_names.php
- /includes/languages/english/all_articles.php
- /includes/languages/english/article.php
- /includes/languages/english/extra_definitions/news_box_manager_defines.php
- /includes/modules/news_box_format.php
- /includes/modules/pages/all_articles/header_php.php
- /includes/modules/pages/article/header_php.php
- /includes/modules/pages/more_news/header_php.php
- /includes/modules/pages/news_archive/header_php.php
- /includes/modules/sideboxes/news_box_sidebox.php
- /includes/modules/sideboxes/news_box_sidebox2.php
- /includes/templates/template_default/sideboxes/tpl_news_box_sidebox.php
- /includes/templates/template_default/templates/tpl_modules_news_box_format.php
- /includes/templates/template_default/templates/tpl_all_articles_default.php
- /includes/templates/template_default/templates/tpl_article.php -> Actual file: tpl_article_default.php
- /includes/templates/YOUR_TEMPLATE/css/stylesheet_news_box_manager.css
- Not described: /includes/templates/YOUR_TEMPLATE/jscript/jscript_slidebox_slider.js
- Optional, see above: /includes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php
- /YOUR_ADMIN/news_box_manager.php
- /YOUR_ADMIN/news_box_manager1.php
- /YOUR_ADMIN/news_box_manager2.php
- /YOUR_ADMIN/news_box_manager3.php
- /YOUR_ADMIN/news_box_manager4.php
- /YOUR_ADMIN/includes/auto_loaders/config.news_box_manager.php
- /YOUR_ADMIN/includes/classes/observers/NewsBoxManagerAdminObserver.php
- /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_file_database_names.php
- /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_sanitization.php (Added in v2.1.1)
- /YOUR_ADMIN/includes/functions/news_box_manager_functions.php
- /YOUR_ADMIN/includes/init_includes/init_news_box_manager_admin.php
- /YOUR_ADMIN/includes/init_includes/init_news_box_manager_install.php -> Actual file: news_box_manager_install.php
- /YOUR_ADMIN/includes/init_includes/init_news_box_manager_update.php-> Actual file: news_box_manager_update.php
- /YOUR_ADMIN/includes/languages/english/news_box_manager.php
- /YOUR_ADMIN/includes/languages/english/extra_definitions/news_box_manager_menu_name.php
@gernot, thanks (again) for the review. I'll get that documentation and the file-set to match ... real-soon-now!
I've created a v3.0.3a version on GitHub only (since it's just documentation and a file removal): https://github.com/lat9/news_box_manager_v3/releases
I tried installing version 3.03 of this plugin today on Zen Cart version 1.56c with the bootstrap theme on PHP 7.1.
After the installation attempt, the site functions, but I am locked out of my Admin with the blank white page and text error:
"WARNING: An Error occurred, please refresh the page and try again..."
Here is my debug log:
Any thoughts to help fix this?Code:[28-Mar-2020 17:43:01 UTC] Request URI: /zencartfolder/adminfolder/index.php, IP address:
#1 trigger_error() called at [/home/sitefolder/public_html/zencartfolder/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/sitefolder/public_html/zencartfolder/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/sitefolder/public_html/zencartfolder/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/news_box_manager_update.php:30]
#5 require(/home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/news_box_manager_update.php) called at [/home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/init_news_box_manager_admin.php:62]
#6 require(/home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/init_news_box_manager_admin.php) called at [/home/sitefolder/public_html/zencartfolder/includes/autoload_func.php:48]
#7 require(/home/sitefolder/public_html/zencartfolder/includes/autoload_func.php) called at [/home/sitefolder/public_html/zencartfolder/adminfolder/includes/application_top.php:171]
#8 require(/home/sitefolder/public_html/zencartfolder/adminfolder/includes/application_top.php) called at [/home/sitefolder/public_html/zencartfolder/adminfolder/index.php:10]
--> PHP Fatal error: 1292:Incorrect datetime value: '0000-00-00 00:00:00' for column 'news_added_date' at row 1 :: UPDATE box_news
SET `news_added_date` = '0001-01-01 00:00:00'
WHERE `news_added_date` = '0000-00-00 00:00:00' ==> (as called by) /home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/news_box_manager_update.php on line 30 <== in /home/sitefolder/public_html/zencartfolder/includes/classes/db/mysql/query_factory.php on line 171.
While I look for a "better" solution, you can create a file in your admin (/admin/includes/extra_datafiles/mysql_mode_control.php, where /admin is replaced by your site's admin-directory name) containing:
Once that file's present, refresh your admin to allow those '0000-00-00 00:00:00' dates to be corrected; then you can remove that file. Note that, like the original News Box Manager, some older plugins made use of that (now disallowed) 0-valued dates, so you might have other issues, too.Code:<?php
/**
* @package install
* @copyright Copyright 2003-2018 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: Drbyte Sun Jan 7 22:37:45 2018 -0500 Modified in v1.5.6 $
*
*/
/**
* Optionally set a MySQL mode during installation
* Ref: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
*/
define('DB_MYSQL_MODE', 'TRADITIONAL');
//define('DB_MYSQL_MODE', 'STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO');
No, sorry. Adding that file had no effect. Still getting the same admin login error, and same PHP fatal error as before in the log file.
I'll also add that my site runs on MySQL version 5.7.29 along with PHP 7.1.
I have added no previous plugins to this site with admin edits, other than the bootstrap template.
This is my first attempt at the News Box Manager install. There were no previous versions installed.
I am familiar with editing tables in phpMyAdmin through cPanel, if that offers options.
Or, is there another way to uninstall the plugin if I don't have Zen Cart admin access?
OK, try editing /admin/includes/init_includes/news_box_manager_update.php, starting at line 29 to read, changing the highlighted lines:
Code:$db->Execute(
"UPDATE " . TABLE_BOX_NEWS . "
SET `news_added_date` = '0001-01-01 00:00:00'
WHERE CAST(`news_added_date` AS CHAR(20)) = '0000-00-00 00:00:00'"
);
$db->Execute(
"UPDATE " . TABLE_BOX_NEWS . "
SET `news_end_date` = NULL
WHERE CAST(`news_end_date` AS CHAR(20)) = '0000-00-00 00:00:00'"
);
OK. The last fix in post #57 resolved my issue. I now have admin access again. Thank you so much!
Also, I did delete the file in post #55.
This plugin seems to be what I've wanted for awhile. I can essentially use it as a blog tool on my site, it seems?
I'm looking forward to giving this a try.