Re: Interm Patch: Re-enable "SEO" cache after disabling
Quote:
Originally Posted by
lhungil
Description
If you disable the "SEO" cache in the admin configuration you are unable to re-enable the "SEO" cache.
Affected environments
Ultimate SEO URLs version 2.210 and 2.211.
Solution (until next version)
Replace the function "usu_check_cache_options" in "admin/includes/functions/extra_functions/seo.php" starting on line 104 with the following:
I'm guessing it should be fairly obvious where the beginning and end for the replacement in the seo.php file should be...but if not, can you specify what the end string people should look out for while doing the replacement?
(for people who aren't familiar with reading code)
:) Thanks!
Re: Interm Patch: Re-enable "SEO" cache after disabling
Line 103 to the end of the file (basically the entire function).
Re: Interm Patch: Re-enable "SEO" cache after disabling
Hi,
After installing this module almost all links are replaced by index.html or product_info.html
What could be wrong?
zen-cart 1.5.0.
Ultimate SEO Version: 2.211
PHP version: 5.3.10
Catalog is in the root, so in .htaccess rewritebase is set to /
settings:
Generate cPath parameters auto
Rewritten URLs end with .html
Format of rewritten URLs original
Categories as directories short
Enter PCRE filter rules for generated URLs
Enter special character conversions
Remove all non-alphanumeric characters? special
Enable automatic redirects? true
Enable SEO cache to save queries? false
Enable product cache? false
Enable categories cache? false
Enable manufacturers cache? false
Enable ez pages cache? false
Re: Interm Patch: Re-enable "SEO" cache after disabling
Hi,
A link or non-linked text address to your site will help the forum help you better.
Also, looking at your profile history of posts, it looks like your cart is an upgraded cart to 1.5.0 rather than a fresh install? I know that people had problems when upgrading (vs fresh install) in the earlier days with 1.5.0 and Ultimate SEO URL, but that may have been resolved with the latest Ultimate SEO editions.
But without seeing your site we really have little or no idea of what's going on.
prommart.com (Ultimate SEO URL)
fashion-mart.biz (Simple SEO URL)
Diagnosing Issues after initial installation
Quote:
Originally Posted by
mrtorrez
After installing this module almost all links are replaced by index.html or product_info.html
I am unable to duplicate this behavior with a clean Zen Cart 1.5.0 installation.
Information which may help us diagnose the issue you are encountering include: a link to your site, the contents of any message you received in the admin interface when installing, your .htaccess file, any debug log files, and a list of all other modifications made to your installation.
The ideal information would be a detailed list of steps taken to duplicate the issue you are experiencing starting from a clean Zen Cart 1.5 installation.
Quote:
Originally Posted by
mrtorrez
What could be wrong?
Common installation mistakes (in order of frequency)
1) A failed merge. Something merged incorrectly when installing the plugin or when upgrading Zen Cart from 1.3 to 1.5.
2) Skipping a step during the installation. Often when people have not read the installation instructions - or accidentally overlook one of the steps.
3) Attempting to upgrade from versions of "Ultimate SEO URLs" prior to version 2.150 without first removing the previous version and all changes made by the previous versions.
If reinstalling this plugin does not fix the problem - You may want to run WinMerge, Beyond Compare, or a similar tool and see what is different between your installation and the stock Zen Cart 1.5.0 files.
Problems with Special Character Conversion in utf-8
Hello everyone, sorry if I interrupt a discussion but maybe this is of relevance for the development of Ultimate SEO.
I installed it today and it works as advertised, which is nice.
I do however have a problem with the Special Character Conversion. I have a German translation of my site (bitaurum.eu), and some of the Category and product-titles contain Umlauts such as "Krügerrand".
The Special Character Conversion tool is of course a nice feature to use in that instance, because it would convert like ü=>ue, everyone can read the URL, google likes it and I am happy. Except that it doesn't work :P
The main reason for this (I suspect) is the fact that I am running a utf-8 system, sql-database and zen-cart installation, mostly because writing html like "look at this nice Krügerrand" is a pain in the arse.
Since this is a live website, I patched it up q&d by doing this in /includes/classes/seo.url.php:
PHP Code:
case 'special':
// Remove all punctuation
if(!self::$unicodeEnabled) {
// POSIX named classes are not supported by preg_replace
$pattern = '/[!"#$%&\'()*+,.\/:;<=>?@[\\\]^_`{|}~]/';
} else {
// Each language's punctuation.
$pattern = '/[\p{P}\p{S}äöüÄÖÜß]/u'; //Franken-fix
This of course only removes the umlauts but does not replace them. I suspect the culprit in
PHP Code:
// Next run Character Conversion Sets over the string
if(is_array($this->filter_char)) $retval = strtr($retval, $this->filter_char);
strtr, if I read correctly, doesn't handle multibyte characters right, which is kind of the thing utf8 is all about.
Does anyone have an idea on how to replace that function? I'd do some trial and error, but I am running a live site which is getting indexed by google's crawlers right now, and would be happy not to make it look like it's broken half of the time...
Thanks for the help and the great tools, it's good to see so much nice, free software is out there.
Re: Problems with Special Character Conversion in utf-8
Quote:
Originally Posted by
BitAurum
I do however have a problem with the Special Character Conversion. I have a German translation of my site (bitaurum.eu), and some of the Category and product-titles contain Umlauts such as "Krügerrand".
I've been thinking about removing the "character filter" for awhile now as I feel it is a bit confusing. As you stated it was only designed to handle the replacement of a single byte character with another single byte character (mostly iso-latin-1).
The better (and more powerful feature) is the PCRE filter... This allows string replacements of any string with any other string. For example: "ü=>ue" This also eliminates the need for your "frankenfix". :D
As you use non-english characters I am going to send you an invite to the latest BETA version so you can test the changes in your environment (it includes a fix for handling redirects with non-english characters in the URL). This way we can test the changes in a non-english installation before I release the next version.
Interm Patch: Load filters before cache is generated
Description
The "SEO" cache is generated before all filters are loaded. This causes the "PCRE" and "character" filters to not run before generated URLs are placed in the cache.
Affected environments
Ultimate SEO URLs version 2.210 and 2.211.
Solution (until next version)
Change the following lines in "includes/classes/seo.url.php" from around line 74 - 93
From:
Code:
if(defined('SEO_USE_CACHE_GLOBAL') && SEO_USE_CACHE_GLOBAL == 'true'){
$this->cache_file = 'seo_urls_v2_';
$this->cache_gc(); // Cleanup Cache
// Generate enabled caches
if(SEO_USE_CACHE_PRODUCTS == 'true') $this->generate_products_cache();
if(SEO_USE_CACHE_CATEGORIES == 'true') $this->generate_categories_cache();
if(SEO_USE_CACHE_MANUFACTURERS == 'true') $this->generate_manufacturers_cache();
if(SEO_USE_CACHE_EZ_PAGES == 'true') $this->generate_ezpages_cache();
}
$this->check_canonical();
if(defined('SEO_USE_REDIRECT') && SEO_USE_REDIRECT == 'true') {
$this->check_redirect();
}
$this->filter_pcre = defined('SEO_URLS_FILTER_PCRE') ? $this->expand(SEO_URLS_FILTER_PCRE, true) : 'false';
$this->filter_char = defined('SEO_URLS_FILTER_CHARS') ? $this->expand(SEO_URLS_FILTER_PCRE) : 'false';
To:
Code:
$this->filter_pcre = defined('SEO_URLS_FILTER_PCRE') ? $this->expand(SEO_URLS_FILTER_PCRE, true) : 'false';
$this->filter_char = defined('SEO_URLS_FILTER_CHARS') ? $this->expand(SEO_URLS_FILTER_PCRE) : 'false';
if(defined('SEO_USE_CACHE_GLOBAL') && SEO_USE_CACHE_GLOBAL == 'true'){
$this->cache_file = 'seo_urls_v2_';
$this->cache_gc(); // Cleanup Cache
// Generate enabled caches
if(SEO_USE_CACHE_PRODUCTS == 'true') $this->generate_products_cache();
if(SEO_USE_CACHE_CATEGORIES == 'true') $this->generate_categories_cache();
if(SEO_USE_CACHE_MANUFACTURERS == 'true') $this->generate_manufacturers_cache();
if(SEO_USE_CACHE_EZ_PAGES == 'true') $this->generate_ezpages_cache();
}
$this->check_canonical();
if(defined('SEO_USE_REDIRECT') && SEO_USE_REDIRECT == 'true') {
$this->check_redirect();
}