Page 3 of 14 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 134
  1. #21
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    274
    Plugin Contributions
    0

    Default Re: News Box Manager v3.0.0 [Support Thread]

    Hello,
    I've tried to install this add-on, v3.0.2, for the first time on my test site, hopefully according to the instructions (I did not have a tpl_index_default.php file yet, so all the files in the add-on could be copied as-is, I merely ensured they had correct ownership and permissions on my linux system).

    The problem is that the DB initialization did not seem to work, so although the Admin menus for the add-on all appear fine, and I have the ability to create articles, which I did: a single Type 1 article in both English and Japanese (my two site languages). Unfortunately, when I activate the sidebox for New Type 1 in order to actually display on storefront, I get a "An error appeared, please refresh page" type of error in the location where the sidebox should appear.

    Interestingly, no debug log is produced. However, when I set strict debugging, the on-page warning turns into the very clear indication that the DB tables were not created as expected:
    Code:
    1146 Table 'zencartshoptest.TABLE_BOX_NEWS_CONTENT' doesn't exist
    in:
    [SELECT nc.news_title, nc.news_content, n.* FROM TABLE_BOX_NEWS_CONTENT nc INNER JOIN TABLE_BOX_NEWS n ON n.box_news_id = nc.box_news_id AND nc.languages_id = 3 WHERE n.news_status = 1 AND now() >= n.news_start_date AND (n.news_end_date IS NULL OR now() <= n.news_end_date) ORDER BY n.news_start_date DESC, n.box_news_id DESC LIMIT 5]
    Obviously, something went wrong, but I am unsure what best to do to fix the situation.
    I also noticed that there was a file in the add-on not listed in the HTML instructions:
    Code:
    YOUR_ADMIN/includes/classes/observers/NewsBoxManagerAdminObserver.php
    and that there was no observer in my ADMIN/classes directory yet, so that meant the new addition of a directory in my ADMIN folder.

    Any other information required, please ask. I will wait before uninstalling and trying to re-install.
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.0.0 with available Japanese language pack and far fewer required plugins.

  2. #22
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    274
    Plugin Contributions
    0

    Default Re: News Box Manager v3.0.0 [Support Thread]

    Hi lat9,
    I did a comparison of the files described in the docs folder of the add-on for News Box Manager v3.0.2, and what files are actually included.
    I think the main problem might be an incorrectly-named definition file? Not sure about the mismatch of the various files, so will wait for confirmation.

    As listed in docs
    (I marked as OK if the described files were actually there)
    OK: /includes/classes/observers/auto.news_box_manager_metatags.php
    Does not exist---wrong Name?: /includes/extra_datafiles/news_box_manager_file_database_names.php
    OK: /includes/languages/english/all_articles.php
    OK: /includes/languages/english/article.php
    OK: /includes/languages/english/extra_definitions/news_box_manager_defines.php
    OK: /includes/modules/news_box_format.php
    OK: /includes/modules/pages/all_articles/header_php.php
    OK: /includes/modules/pages/article/header_php.php
    OK: /includes/modules/pages/more_news/header_php.php
    OK: /includes/modules/pages/news_archive/header_php.php
    OK: /includes/modules/sideboxes/news_box_sidebox.php
    OK: /includes/templates/template_default/sideboxes/tpl_news_box_sidebox.php
    Does not exist: /includes/templates/template_default/sideboxes/tpl_news_box_sidebox2.php
    OK: /includes/templates/template_default/templates/tpl_modules_news_box_format.php
    OK: /includes/templates/template_default/templates/tpl_all_articles_default.php
    OK: /includes/templates/template_default/templates/tpl_article.php
    OK: /includes/templates/YOUR_TEMPLATE/css/stylesheet_news_box_manager.css
    OK: /includes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php
    OK: /YOUR_ADMIN/news_box_manager.php
    OK: /YOUR_ADMIN/includes/auto_loaders/config.news_box_manager.php
    OK: /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_file_database_names.php
    OK: /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_sanitization.php
    OK: /YOUR_ADMIN/includes/init_includes/init_news_box_manager_admin.php
    OK: /YOUR_ADMIN/includes/languages/english/news_box_manager.php
    OK: /YOUR_ADMIN/includes/languages/english/extra_definitions/news_box_manager_menu_name.php

    Files existing but not described in docs:
    /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/classes/observers/NewsBoxManagerAdminObserver.php
    /YOUR_ADMIN/includes/functions/news_box_manager_functions.php
    /YOUR_ADMIN/includes/init_includes/init_news_box_manager_install.pph
    /YOUR_ADMIN/includes/init_includes/init_news_box_manager_update.php
    Possibly wrong name?: /includes/extra_datafiles/news_box_file_database_names.php
    /includes/modules/sideboxes/news_box_sidebox2.php
    /includes/templates/YOUR_TEMPLATE/jscript/jscript_sidebox_slider.js
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.0.0 with available Japanese language pack and far fewer required plugins.

  3. #23
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,753
    Plugin Contributions
    89

    Default Re: News Box Manager v3.0.0 [Support Thread]

    @gernot, thanks for pointing out the issues with the documentation. I'll be getting that updated.

    Since there are no core-file overwrites in the plugin, you can safely copy all the files from the plugin's distribution to apply those updates.

    That TABLE_BOX_NEWS_CONTENT value is defined in the admin's /extra_datafiles module.

  4. #24
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    274
    Plugin Contributions
    0

    Default Re: News Box Manager v3.0.0 [Support Thread]

    Hi lat9,
    Can you confirm whether the extra_datafiles file has a name issue? As I wrote, I did copy all the files that were in the plugin, but the DB was not properly initialized, and I wonder if that might be caused by the file name not having the word "manager" in its name?
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.0.0 with available Japanese language pack and far fewer required plugins.

  5. #25
    Join Date
    Dec 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: News Box Manager v3.0.0 [Support Thread]

    Hi,

    Thank you for the mod, I updated from v2 to v3


    I got error log as below.

    PHP Warning: constant(): Couldn't find constant BOX_NEWS_NAME_TYPE in /home/****/www/***admin***/news_box_manager.php on line 719.

    news_box_manager.php line719
    Code:
    <div class="col-sm-2"><?php echo constant("BOX_NEWS_NAME_TYPE$news_content_type"); ?></div>
    It will be used in a preview page, if I update or add a news from [All Types], it's OK.
    But if I do from [Type1] or [Type2] ,[Type*] menu, it shows nothing in the "News Type:" column.

  6. #26
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,753
    Plugin Contributions
    89

    Default Re: News Box Manager v3.0.0 [Support Thread]

    Those BOX_NEWS_NAME_TYPE[1-4] constants are provided in the distribution's storefront /includes/languages/english/extra_definitions/news_box_manager_defines.php. That file (or your template's version thereof) is used in both the admin and storefront processing.

    Check to see if you have an older version of that file present in /includes/languages/english/extra_definitions/YOUR_TEMPLATE that doesn't have those additional defines.

  7. #27
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,753
    Plugin Contributions
    89

    Default Re: News Box Manager v3.0.0 [Support Thread]

    Quote Originally Posted by gernot View Post
    Hi lat9,
    Can you confirm whether the extra_datafiles file has a name issue? As I wrote, I did copy all the files that were in the plugin, but the DB was not properly initialized, and I wonder if that might be caused by the file name not having the word "manager" in its name?
    It has nothing to do with the filenames, just their locations. Were there any logs generated?

  8. #28
    Join Date
    Dec 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: News Box Manager v3.0.0 [Support Thread]

    Thank you for your reply.

    My explanation was not enough.
    I have removed all v2 files when I update for my test website.
    I haven't changed the definition in the "news_box_manager_defines.php" yet, but I think it works because I can see the word Type1 not BOX_NEWS_NAME_TYPE1.

    If I insert a news from Tools -> News Box Manager[All Types] -> Insert -> Preview, "News Type:" shows its type.
    Click image for larger version. 

Name:	typeall.png 
Views:	43 
Size:	10.9 KB 
ID:	18884

    And if I insert a news from Tools -> News Box Manager[Type1(or 2,3,4)] -> Insert -> Preview, "News Type:" shows nothing and I get error log.
    Click image for larger version. 

Name:	type1.png 
Views:	57 
Size:	10.4 KB 
ID:	18885

    PHP Warning: constant(): Couldn't find constant BOX_NEWS_NAME_TYPE in /home/****/www/***admin***/news_box_manager.php on line 719.


    I'm right in the middle of learning PHP, so if you have any suggestions please let me know.
    Thank you,

  9. #29
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    274
    Plugin Contributions
    0

    Default Re: News Box Manager v3.0.0 [Support Thread]

    Hi lat9,
    No, no logs were generated, which I thought was a bit strange, but strict error checking enabled shows up the error on the screen, as I pasted in my initial post.
    I have the file in the admin extra datafiles places as instructed:
    Code:
    test-admin# cat includes/extra_datafiles/news_box_manager_file_database_names.php 
    <?php
    // -----
    // Part of the News Box Manager plugin, re-structured for Zen Cart v1.5.6 and later by lat9.
    // Copyright (C) 2015-2019, Vinos de Frutas Tropicales
    //
    // +----------------------------------------------------------------------+
    // | Do Not Remove: Coded for Zen-Cart by geeks4u.com                     |
    // | Dedicated to Memory of Amelita "Emmy" Abordo Gelarderes              |
    // +----------------------------------------------------------------------+
    //
    define('TABLE_BOX_NEWS', DB_PREFIX . 'box_news');
    define('TABLE_BOX_NEWS_CONTENT', DB_PREFIX . 'box_news_content');
    
    define('FILENAME_NEWS_BOX_MANAGER', 'news_box_manager');
    define('FILENAME_NEWS_BOX_MANAGER1', 'news_box_manager1');
    define('FILENAME_NEWS_BOX_MANAGER2', 'news_box_manager2');
    define('FILENAME_NEWS_BOX_MANAGER3', 'news_box_manager3');
    define('FILENAME_NEWS_BOX_MANAGER4', 'news_box_manager4');
    Both the box_news and box_news_content tables do exist apparently:
    Code:
    MariaDB [zencartshoptest]> desc box_news;
    +--------------------+------------+------+-----+---------------------+----------------+
    | Field              | Type       | Null | Key | Default             | Extra          |
    +--------------------+------------+------+-----+---------------------+----------------+
    | box_news_id        | int(11)    | NO   | PRI | NULL                | auto_increment |
    | news_added_date    | datetime   | YES  |     | 0001-01-01 00:00:00 |                |
    | news_modified_date | datetime   | YES  |     | NULL                |                |
    | news_start_date    | datetime   | YES  |     | NULL                |                |
    | news_end_date      | datetime   | YES  |     | NULL                |                |
    | news_status        | tinyint(1) | YES  |     | 0                   |                |
    | news_content_type  | tinyint(1) | NO   |     | 1                   |                |
    +--------------------+------------+------+-----+---------------------+----------------+
    7 rows in set (0.014 sec)
    
    MariaDB [zencartshoptest]> desc box_news_content;
    +---------------------------+--------------+------+-----+---------+-------+
    | Field                     | Type         | Null | Key | Default | Extra |
    +---------------------------+--------------+------+-----+---------+-------+
    | box_news_id               | int(11)      | NO   | PRI | 0       |       |
    | languages_id              | int(11)      | NO   | PRI | 1       |       |
    | news_title                | varchar(255) | NO   |     |         |       |
    | news_content              | text         | NO   |     | NULL    |       |
    | news_metatags_title       | varchar(255) | NO   |     |         |       |
    | news_metatags_keywords    | text         | YES  |     | NULL    |       |
    | news_metatags_description | text         | YES  |     | NULL    |       |
    +---------------------------+--------------+------+-----+---------+-------+
    7 rows in set (0.001 sec)
    Last edited by gernot; 1 Mar 2020 at 08:52 AM.
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.0.0 with available Japanese language pack and far fewer required plugins.

  10. #30
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    274
    Plugin Contributions
    0

    Default Re: News Box Manager v3.0.0 [Support Thread]

    lat9,
    It's official: I am retarded. After you asked about logs again, I did look again, and just for, you know, dumb*ss checking, I looked at my production shop logs, and there I see error logs related to my test shop!
    So of course I realize I screwed up something... turns out in the storefront includes/configure.php I had the DIR_FS_CATALOG set to my production shop.
    All other defines were fine in the storefront configure, just that one was wrong. Ouch! The admin configure file was completely fine.
    That explains why the admin side worked but the display did not.
    So sorry for the hassle.

    Remaining questions:
    Are there missing files in the plugin, for sideboxes? Or is it merely the documentation that needs updating?
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.0.0 with available Japanese language pack and far fewer required plugins.

 

 
Page 3 of 14 FirstFirst 1234513 ... LastLast

Similar Threads

  1. v151 Log Manager [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 19 Oct 2023, 11:44 AM
  2. Link Manager 3.0 Support Thread
    By clydejones in forum Addon Sideboxes
    Replies: 1987
    Last Post: 6 Aug 2021, 02:56 PM
  3. Testimonial Manager Support Thread
    By clydejones in forum All Other Contributions/Addons
    Replies: 1500
    Last Post: 4 Feb 2021, 04:12 PM
  4. v154 News Box Manager v2.0.0 [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 84
    Last Post: 19 Jan 2021, 04:17 PM
  5. Poll Manager Support Thread
    By boudewijn in forum Addon Sideboxes
    Replies: 148
    Last Post: 27 Jan 2016, 09:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR