Jump to content

bsmither

Member
  • Posts

    18,012
  • Joined

  • Last visited

  • Days Won

    605

Posts posted by bsmither

  1. You have a busy site!

    The first is because CubeCart assumes everything that makes a call to your site will announce what it is - a header called the User-Agent-String. But this bit of info is not always present.

    Basically, these are two cases of many where PHP 8+ now makes Warning complaints where they were Notices before.

    Until the next version of CubeCart comes out, these edits will silence PHP complaining about these particular statements:

    /classes/ssl.class.php, line 39, from:
    if ($GLOBALS['config']->get('config', 'ssl') && !ADMIN_CP && !CC_SSL && !in_array($_GET['_g'], $this->_ignored_pages)) {
    
    To:
    if (isset($_GET['_g']) && $GLOBALS['config']->get('config', 'ssl') && !ADMIN_CP && !CC_SSL && !in_array($_GET['_g'], $this->_ignored_pages)) {
    
    /classes/session.class.php, line 676, from:
    return strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') ? 'IEX' : htmlspecialchars($_SERVER['HTTP_USER_AGENT']);
    
    To:
    return strpos(($_SERVER['HTTP_USER_AGENT'] ?? "Not Available"), 'Trident') ? 'IEX' : htmlspecialchars($_SERVER['HTTP_USER_AGENT'] ?? "Not Available");

     

  2. In admin, Languages, click on the Edit icon of the language you wish to edit.

    On the next page, from the Phrase Group dropdown selector, choose "Checkout".

    On the next page, in the first column, find 'error_shipping'. Click directly on 'error_shipping'. This makes the text edit box active.

    Make the desired changes and Save.

    If a store visitor has not logged in, and also has not used the "Estimate shipping and tax" feature (if enabled), then CubeCart uses the store's location as an estimated initial shipping destination.

    So, this message appears if no shipping modules are installed or enabled, or the enabled modules could not provide a legit shipping quote.

  3. I believe I have found the problem. It is described here:

    https://github.com/cubecart/v6/issues/3249

    With PHP 7.1, up to but not including PHP 7.4+, CC651 is not a critical upgrade (if I recall correctly). Using PHP 7.4, or especially PHP 8.1+, then CC651 is very much recommended - but still not critical.
     

  4. Any plugins or Code Snippets? If so:

    In /includes/global.inc.php
    Find:
    $glob['safe_mode'] = false;
    
    Change to:
    $glob['safe_mode'] = true;

    This file is usually set to Read-Only. You will need to change this using the File Explorer tool in the control panel of your hosting environment.

    This will inhibit any and all plugins. If the problem goes away, start looking at there.

  5. Using an external database utility (such as phpMyAdmin, a tool found in many control panels for hosted accounts), look directly at CubeCart_system_error_log.

    Is there anything interesting there?

     

    After you upgrade, but before trying to log in to the admin, make these edits:

    /classes/acp.class.php, line 265, from:
    public function newFeatures($version, $features, $total, $notes) {
    
    To:
    public function newFeatures($version, $features, $total, $notes = '') { // #3222

     

  6. 1. No.

    2. Unknown.

    3. There was something similar. That person unchecked the GD extension in the Cpanel, saved, then re-checked it, saved.

    If you can get into admin, at the bottom of the left pane Navigation, click PHP Info.

    On that screen, scroll to the table gd. That table will be located between ftp and gettext, if it is loaded - not present otherwise.

     

  7. In admin, Email Templates, click the language of the email you wish to edit. On the next screen, on the HTML Content tab, note that in the list of Available Macros, there is {$DATA.customer_comments}. Add this to the HTML of the email wherever you wish. For example:

    Find:
    <p><a href="{$DATA.link}">{$DATA.link}</a></p>
    
    Add after:
    <p>Your comments about this order: &quot;{$DATA.customer_comments}&quot;</p>

     

     

    • Thanks 1
  8. In the database table CubeCart_history, each row records when that specific version of CubeCart (6.4.9, for example) was checked for any necessary changes to be made to the database structure. The Setup procedure will look in /setup/db/upgrade/ for files that are numbered higher than the last version recorded in the database.

    Ultimately, the CubeCart code that is running the setup (6.5.1, for example) will record in the database Cubecart_history table when that check was made to make the database "married" to the version of CubeCart. This insertion of the record will happen even though there are no files in the setup folder named 6.5.0 or 6.5.1.

    But if CubeCart 6.5.1 sees the last record refers to 6.5.0 (if that is the last version under which you ran setup), CubeCart should display a banner in admin saying something to the effect, "Your are running 651, but the database is at 650. Do you want to run setup?"

    Because the code base was "manually" upgraded from 650 to 651, one needs to manually insert a new record showing the version and the Unix Epoch Time so that CubeCart won't complain anymore.

    Note that when manually upgrading a store in this manner, one needs to be aware of any files in /setup/db/upgrade/ and /setup/scripts/upgrade/ that contains changes to the database structure or content.

    The Unix Epoch Time is the number of seconds that has elapsed since midnight, the morning of Jan 1, 1970 UTC, and is used everywhere in the world.

     

  9. There is rogue code at your lines 1809-1833 (and maybe one other line). The new code to use ElasticSearch does not belong here. It belongs, in fact, directly after the last line you posted above.

    Your line 1833 (one of the rogue lines of code) starts an else block of code. Therefore, there is probably a closing parenthesis further down the script that ends this block of code. That closing parenthesis would also be a line of rogue code.

    I recommend making a careful comparison of the searchCatalogue() function from your installation with what is posted here:

    https://github.com/cubecart/v6/blob/v6.5-master/classes/catalogue.class.php

     

  10. Did you retry the test having fixed the "debug code didn't take" at near lines 1783 and 1820?

    Oh, I see. You added more content.

    Show me a few lines of code above and below Catalogue::searchCatalogue, line (1796).

    The list shows that after line 1796, execution somehow gets sent back to line 1788.

     

  11. Keeping the same name and their location in the folders, I would make sure that wherever the new images are located, they have the desired names and being in the desired folders. Then FTP the lot and requesting the FTP transfer to overwrite existing files.

    Then, have CubeCart clear it's internal cache, which clears out all the pre-sized images derived from the source.

     

×
×
  • Create New...