Results 1 to 10 of 2445

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by torvista View Post
    I cast an eye over this thread but get dizzy with the details.

    I would say that back in the day it was this mod that required me to use virtual hosts for local development work as detailed in my previous posts. No other method (alias) would work.

    Long ago I updated this code for php7 and other bits, and to keep it alive posted it on Github.

    I see someone has posted a "new" version in the plugins.
    This I have not compared to mine so I cannot vouch for it.

    I know mine works....so maybe you should compare it.
    Is this important? Its in 1.5.5e/includes/templates/MYTEMPLATE/html_header.php

    Code:
    //steve bof CEON uri mapping
            //CEON uri mapping produces a canonical link with no extra parameters: so no "?" after the url.
            //To create the alternate urls for hreflang use, for all pages (apart from the home page), '&language=' is appended to the canonical url. This gets a page not found (in the Google Search Console) as the "&" needs to be a "?" as there are no other parameters.
            //Since the $canonicalLink is already created, it needs to be checked for the presence of a "?". If so, ok, if not use the "?" instead of "&".
            //echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type) : $canonicalLink . '&amp;language=' . $key) . '" hreflang="' . $key . '" />' . "\n";
            echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type) : $canonicalLink . (strpos($canonicalLink, '?') ? '&amp;' : '?') . 'language=' . $key) . '" hreflang="' . $key . '" />' . "\n";//steve as per https://github.com/zencart/zencart/pull/1314/files
      }
      // EOF hreflang for multilingual sites
    Just it breaks my site and I get a white page when I try to load the home page.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by Nick1973 View Post
    Is this important? Its in 1.5.5e/includes/templates/MYTEMPLATE/html_header.php

    Code:
    //steve bof CEON uri mapping
            //CEON uri mapping produces a canonical link with no extra parameters: so no "?" after the url.
            //To create the alternate urls for hreflang use, for all pages (apart from the home page), '&amp;language=' is appended to the canonical url. This gets a page not found (in the Google Search Console) as the "&amp;" needs to be a "?" as there are no other parameters.
            //Since the $canonicalLink is already created, it needs to be checked for the presence of a "?". If so, ok, if not use the "?" instead of "&amp;".
            //echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type) : $canonicalLink . '&amp;language=' . $key) . '" hreflang="' . $key . '" />' . "\n";
            echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type) : $canonicalLink . (strpos($canonicalLink, '?') ? '&amp;' : '?') . 'language=' . $key) . '" hreflang="' . $key . '" />' . "\n";//steve as per https://github.com/zencart/zencart/pull/1314/files
      }
      // EOF hreflang for multilingual sites
    Just it breaks my site and I get a white page when I try to load the home page.
    In what way does it break your site? Ie. what is in the error message?

    It was determined to be important in some way which is why it was added.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by Nick1973 View Post
    I've now pushed one of the domain names live and still the problem of a blank installation check page exists. So obviously its nothing to do with the tilde.
    The error message likely was the same as identified by wmorris where (at least) the file YOUR_ADMIN/includes/classes/class.CeonURIMappingInstallationCheck.php line 2173 uses the null coalesce operator of ?? (available first in PHP 7.0) in:
    Code:
    $path = $old_file_or_dir['file'] ?? $old_file_or_dir['dir'];
    was used instead of the pre-PHP 7.0 release:
    Code:
    $path = isset($old_file_or_dir['file']) ? $old_file_or_dir['file'] : $old_file_or_dir['dir'];
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by mc12345678 View Post
    The error message likely was the same as identified by wmorris where (at least) the file YOUR_ADMIN/includes/classes/class.CeonURIMappingInstallationCheck.php line 2173 uses the null coalesce operator of ?? (available first in PHP 7.0) in:
    Code:
    $path = $old_file_or_dir['file'] ?? $old_file_or_dir['dir'];
    was used instead of the pre-PHP 7.0 release:
    Code:
    $path = isset($old_file_or_dir['file']) ? $old_file_or_dir['file'] : $old_file_or_dir['dir'];
    Ok I have a full working version now. It took a bit of working on but I am there with it. It came together with a mixture of the files submitted for download and the files suggested by torvista

    I will try and pull it all together and submit an update for download.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  5. #5
    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    88
    Plugin Contributions
    1

    Default Re: Ceon URI Mapping v4.x

    I have just installed 4.5.5 this on my test site running 1.5.5f & if I make any changes using admin/ceon_uri_mapping_config.php I get the following error:

    PHP Fatal error: 1366:Incorrect integer value: '' for column 'automatic_version_checking' at row 1 :: update ceon_uri_mapping_configs set autogen_new = '1', whitespace_replacement = '1', capitalisation = '3', remove_words = '-', char_str_replacements = '€=&gt;EUR', mapping_clash_action = 'auto-append', manage_product_reviews_mappings = '0', manage_product_reviews_info_mappings = '0', manage_product_reviews_write_mappings = '0', automatic_version_checking = '' where id = '1'

    I have checked the database & ceon_uri_mapping_configs.automatic_version_checking has a value of 1

    Both of the installation checks are happy & report no errors.

    Does anyone have any idea of what could be causing this or where I should look to find the issue?

    Thanks for your help

    Pat

  6. #6
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by PatClay View Post
    I have just installed 4.5.5 this on my test site running 1.5.5f & if I make any changes using admin/ceon_uri_mapping_config.php I get the following error:

    PHP Fatal error: 1366:Incorrect integer value: '' for column 'automatic_version_checking' at row 1 :: update ceon_uri_mapping_configs set autogen_new = '1', whitespace_replacement = '1', capitalisation = '3', remove_words = '-', char_str_replacements = '€=&gt;EUR', mapping_clash_action = 'auto-append', manage_product_reviews_mappings = '0', manage_product_reviews_info_mappings = '0', manage_product_reviews_write_mappings = '0', automatic_version_checking = '' where id = '1'

    I have checked the database & ceon_uri_mapping_configs.automatic_version_checking has a value of 1

    Both of the installation checks are happy & report no errors.

    Does anyone have any idea of what could be causing this or where I should look to find the issue?

    Thanks for your help

    Pat
    It appears that there is/was an attempt to modify the automatic-version-checking option to off or not to be performed; however, it was not handled properly either in the attempt to remove the version checking option or if it was present, but the appropriate posted information did not contain an expected value.

    A solution that appears acceptable is at/around line 507 of admin/includes/classes/class.CeonURIMappingConfigUtility.php to change:
    Code:
    $this->_automatic_version_checking = $_POSTt'automatic-version-checking'];
    To:
    Code:
    $this->_automatic_version_checking = (int)$_POSTt'automatic-version-checking'];
    By adding the casting of integer.

    I would recommend this regardless of whether version checking returns or remains unavailable to ensure that only an integer value be considered for storage into the database.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    88
    Plugin Contributions
    1

    Default Re: Ceon URI Mapping v4.x

    Thanks for your speedy response. I found the code at line 477 & made the alteration & the error has gone away.

    Just an FYI for anyone following later:

    Code:
    $_POSTt'automatic-version-checking']
    Is a typo & should be

    Code:
    $_POST['automatic-version-checking']

  8. #8
    Join Date
    Dec 2010
    Location
    U.S. State of Texas
    Posts
    76
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Well heck. I thought all was good and then not. I am running 1.5.5f. I am not using an "unused" domain, but the store is live. myfurnituretx.com

    I am having a problem when updating or adding products to the store. After clicking "preview" upon updating or adding a product, I receive a blank screen (should be insert or update). When I toggle the "Offer Auto-generation of URIs for Categories, Products, Manufacturers and EZ-Pages:" to No, all is good. But when on yes, it does not work. My urls are also not changing when in selecting yes or no. I did an installation check and all checks out good. I copied and pasted the rewrite .htaccess file and loaded to the root.

    htaccess file is:


    RewriteEngine On

    # Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
    RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
    # Don't rewrite any URIs for some, popular specific file format extensions,
    # which are not covered by main file extension condition above
    RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
    # Don't rewrite any URIs for some specific file format extensions,
    # which are not covered by main file extension condition above
    # Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
    #RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
    # Don't rewrite admin directory
    RewriteCond %{REQUEST_URI} !^/cr_admin [NC]
    # Don't rewrite editors directory
    RewriteCond %{REQUEST_URI} !^/editors/ [NC]
    # Don't rewrite .well-known directory
    RewriteCond %{REQUEST_URI} !^/\.well\-known/ [NC]
    # Don't rewrite logs directory
    RewriteCond %{REQUEST_URI} !^/logs/ [NC]
    # Don't rewrite cgi-bin directory
    RewriteCond %{REQUEST_URI} !^/cgi\-bin/ [NC]
    # Handle all other URIs using Zen Cart (its index.php)
    RewriteRule .* index.php [QSA,L]

    ## END CEON URI MAPPING REWRITE RULE

    I did see a couple of the typos mentioned on the class.CeonURIMappingConfigUtility.php file and updated, but still no luck. I have a feeling there is something simple I am missing. Sorry, I couldn't find it in this thread.

    Any help would be great!

 

 

Similar Threads

  1. v139d Ceon uri mapping, how to generate uri mapping for bulk bulk-imported products?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 8 Jan 2013, 06:52 AM
  2. CEON URI Mapping
    By jmkent in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 22 Nov 2012, 04:28 PM
  3. Ceon URI Mapping (SEO)
    By conor in forum All Other Contributions/Addons
    Replies: 2906
    Last Post: 9 Sep 2011, 08:31 AM
  4. Ceon URI Mapping v4
    By conor in forum All Other Contributions/Addons
    Replies: 110
    Last Post: 14 Aug 2011, 02:51 PM

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