EDIT: @Ksookma, and it looks like we might be using different versions of the Ultimate SEO htaccess. I'm assuming that mine is the latest.
Printable View
EDIT: @Ksookma, and it looks like we might be using different versions of the Ultimate SEO htaccess. I'm assuming that mine is the latest.
*doh* forgot about the initial request to the website.
The canonical should work to tell most search engines the two URLs are the same. At least Google's canonical information mentions you can use canonical links pointing to a different domain. The canonical and base head element used by most templates is pulled from "configure.php", so changing the settings in those files is very important.
That said I would still use the 301 (my live sites do). Just must make sure the settings in "configure.php" match what your .htaccess file does (avoiding unnecessary redirects).
Other than a few additions to handle items not specific to "Ultimate SEO URLs" I'd agree :)
Looking at SPH's example .htaccess, there are a couple of things I would like to mention. These may not apply to every installation, but are good things to keep in mind.
When Zen Cart is installed in the site root, you can safely remove the "ErrorDocument 404 /errors/notfound.html". In this case the only time an web server ErrorDocument would be used is if index.php cannot be found.
It would be better to move the placement of the forced prefix above the "Ultimate SEO URLs" / Zen Cart directives. This will ensure it is always checked before control is passed to Zen Cart (the [L] after a RewriteRule says, "Process this rule rule and do not apply any more rules").
Note: When Zen Cart not installed in the site root (for example in /shop/), any forced 301 to add a domain prefix, ErrorDocument, or other sitewide configuration should be added to either the server configuration file or a .htaccess file in the root directory.
Thanks for the tips. I moved my htaccess canonical redirect to the top and removed the error documents. For the longest time my zencart page not found/error didn't work, but it has been now for some time: http://www.prommart.com/x
The rest of the stuff...mod_expires and mod_deflate...I got from one of my Prestashop test carts, whose admin can really compress and optimize code. Don't know if it's actually helping, but gtmetrics speed test seems to like it.
I tried the patch and it did not fix the issue. So I reverted to original code, since turning off the "select muliple products" choice accomplished what I needed it to do. It adds a buy button underneath each product, but most do not buy more than one at a time anyway.
I have "Display Multiple Products Qty Box Status and Set Button Location" set to "3" (display both) in my test environments and it is working under "Ultimate SEO URLs" 2.07 w/ patch and the newer .htaccess file posted here.
Are there any other settings related to the issue you experienced? I know you have a viable workaround, but if there is a problem, I would like to get it fixed so it does not impact anyone else :)
I installed the beta htaccess file, configured it for "not using categories as directories". It worked for each type of "multiple products add to cart" css3 buttons and locations. You can see the correct response at: http://thedrunkenbundtcakery.com/big...cakes-c-1.html
Thank you again for your hard work.
The Drunken Bundt
Forgive me if this has been answered already, I've been reading up the whole thread and do not recall seeing this mentioned.
It seems in the install package, there are two files:
under:
new_files_151\your_admin_folder\includes\languages\english\extra_definitions\seo .php
new_files_151_english\your_admin_folder\includes\languages\english\extra_definit ions\seo.php
looks like they both get written to the same place. which one is the correct version?
the only difference I notice is the 1st one (the one in new_files_151) is missing the last line which is:
?>
not sure if that is needed to close the <?php statement in the first line...
thanks!
so...
I've installed, and it doesn't seem to have taken :( (nvm, see edit below)
I left all the settings as default.
I put the .htaccess file in the root for where my v151 installation is
wasn't exactly sure what to put for the relative web path for my catalogue, so I've tried /domainname.com/subdir (which are /spritelygoods.com
/zencartv151/) and I've also tried just the subdir as noted below in my .htaccess file... and no joy...
**EDITED:: Looks like it may have been because I had the cart in maintenance mode! Seems to work fine outside of maintenance mode :)
One more question - when I move this thing to the root of my domain, do I just use /domainname.com/ as the rewrite location??
##### NOTE: Replace /yourdomain.com/yourzencartdirectory/ with the relative web path of your catalog in the "Rewrite Base" line below:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /zencartv151/
# Disable if using "Categories as Directories"
#RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)\.html$ $3-p-$4\.html?cPath=$2&%{QUERY_STRING} [R=301,L]
# Enable only if using "Categories as Directories"
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)\.html$ index\.php?main_page=product_info&products_id=$4&cpath=$2&%{QUERY_STRING} [L]
# Normal operation Ultimate SEO URLs
RewriteRule ^(.*)-p-([0-9]+)\.html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
# Disable if using "Categories as Directories"
#RewriteRule ^(.*)-c-([0-9_]+)\.html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
#RewriteRule ^(.*)-c-([0-9_]+)/$ $1-c-$2\.html [R=301,L]
# Enable only if using "Categories as Directories"
RewriteRule ^(.*)-c-([0-9_]+)/?\.html$ $1-c-$2/ [R=301,L]
RewriteRule ^(.*)-c-([0-9_]+)$ %{REQUEST_URI}/ [R=301,L]
RewriteRule ^(.*)-c-([0-9_]+)/$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
# Normal operation Ultimate SEO URLs
RewriteRule ^(.*)-m-([0-9]+)\.html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+)\.html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+)\.html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+)\.html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+)\.html$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]
# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]
# Handle when a resource is not found (404 Error Page)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=page_not_found&%{QUERY_STRING} [L]
Interesting, this is a new one to me - but I do know other people have reported problems with downloads and some other items when the site is in maintenance mode (and without this plugin installed) - so who knows? But gives us another good question to ask :)
Not a fan of testing website applications under different paths from the final path. You should be able to just change the path to your web relative path (top level - no directory - root - is just /). You will also need to make a number of changes to configuration files, possibly some Zen Cart settings, and any paths stored in the database.
On a side note, if you plan to deploy on "domainname.com", I would recommend using "www.domainname.com" instead. You can then safely use a 301 redirect from "domainname.com" to "www.domainname.com".
thanks lhungil.
My original shop is sitting in the root directory right now - I've migrated shops from subdir to main domain before - if I remember right, the config files are what need to be updated - I've rebuilt 1.5.1 from scratch while upgrading my original database (as a new database - the original one is still tied to the original shop). Unfortunately my hand got forced as I received notice from my host that they were updating the PHP software version and that broke my original cart as it was on legacy 1.3.0.2 version of zencart.
I'll be testing things again once i make the migration.
I suspect asking why www .domainname.com and domainname.com are different is a tangent - i'll go see what google has to offer :) (I'm not a web developer by trade so I always presumed they were equivalent!)
I have an old zencart shop and I am working on a fresh and new installation. I am almost finished, but because of an other SEO plugin, the paths on my new site are different with the old one's. All the search results in Google will land on a page of my site that doesn't exists. I will upload a new xml sitemap to Google, but I'm wondering if I could get in trouble with my google rankings, because of all the new url's on my site. There are two major differences:
* My old SEO plugin added multiple parent categories to the Url and this plugin only ads one parent category to the url.
* The old SEO plugin ads the product in the url after the category's and the new plugin uses only the parent directory.
Two example paths:
Browsing to category's:
Old: http://www.pictogrammenwinkel.nl/bra...ser-c-60_62_70
New: http://www.pictogrammenwinkel.nl/nie...er-c-60_62_70/
Browing to a product:
Old: http://www.pictogrammenwinkel.nl/bra...r-bordje-p-300
New: http://www.pictogrammenwinkel.nl/nie...dje-p-300.html
Can someone tell me if I could get in trouble with my Google rankings? If not, then there is no problem, because it seems the plugin is working good :)
If it's going to give me problems with my Google rankings, can I adjust the new SEO plugin, so it shows the same url's as the old one's.
Many thanks for helping out.
Take a look at this post about the different modes built into "Ultimate SEO URLs". The new versions of "Ultimate SEO URLs" support the same features old versions did and includes support for newer features such as "Categories as Directories".
It looks like your templates have removed the "canonical" links. Once you have re-enabled canonical links - you should be okay. If you enable categories as directories this will take care of categories. For the product links you would want to add your old RewriteRule for products to the .htaccess file.
As Zen Cart 1.5 automatically adds a "canonical" link to your pages, SEs will not penalize for duplicate URLs. In theory "canonical" links tell the SEs: "My content is the same as this URL, and this is my preferred URL for you to show in your listings".
Alternatively to be on the safe side you could add some RewriteRules ending with [R=301,L] to redirect from the old URLs to the new ones. This would force 99% of SEs to find the new URL right away. If you have a strong understanding of how RewriteRules work - this is the route I would take.
"admin" -> "configuration" -> "Ultimate SEO".
This is specific to Kcm75's setup, not necessarily yours. Your template is correctly adding the "canonical link".
Again, this is specific to Kcm75's setup. Enabling this setting will make the URLs generated by this plugin for categories look similar to Kcm75's old site. The .htaccess will automatically add the '/' to the end of the category URL in this mode.Quote:
If you enable categories as directories this will take care of categories.
thank you
How can I re-enable the canonical links?Quote:
It looks like your templates have removed the "canonical" links. Once you have re-enabled canonical links - you should be okay
There should be something similar to the following in "includes/templates/your_template_name/common/html_header.php":
If someone removed (or did not include) these lines in your template, canonical links are not added to pages. Zen Cart comes with a default template you can look at for a working example if needed.Code:<?php if (isset($canonicalLink) && $canonicalLink != '') { ?>
<link rel="canonical" href="<?php echo $canonicalLink; ?>" />
<?php } ?>
If someone disabled the canonical system, you will want to download Zen Cart from "www.zen-cart.com" and copy "includes/auto_loaders/config.canonical.php" and "includes/init_includes/init_canonical.php" into your Zen Cart installation.
If you are going the canonical route, and do not plan to modify the .htaccess with RewriteRules generating 301s, make sure you add any needed rules from the old URL Rewriter so website visitors can access your pages under either format (the old ones and the new ones).
I'm not sure with steps to take now. My new store which is now at the location pictogrammenwinkel.nl/nieuw/ has the both canonical files present and the canonical lines are present in the file "includes/templates/your_template_name/common/html_header.php". My old store doesn't have the canonical files and line.
First when just browsing the categories:
Old: "brandbestrijding-bordjes-brandblusser-c-60_62_70/"
New: "bordjes-brandblusser-c-60_62_70/" (Add category parent to begining of URLs?: true, Show categories as directories in the URL?: false)
New: "brandbestrijding-c-60/bordjes-c-60_62/brandblusser-c-60_62_70/" (Add category parent to begining of URLs?: true, Show categories as directories in the URL?: true)
With the settings "add category" to true and "show categories as directories" to false, it almost is the same as my old store. Except my old add-on stacks all the parent/sub directories into the link and the new add-on only takes the last 2 parent/sub directory. In my example there are there categories in the link.
I understand some php, but I am not an expert and I do not understand how RewriteRules work. These lines are in my old store .htaccess file:Quote:
Alternatively to be on the safe side you could add some RewriteRules ending with [R=301,L] to redirect from the old URLs to the new ones. This would force 99% of SEs to find the new URL right away. If you have a strong understanding of how RewriteRules work - this is the route I would take.
Quote:
#### BOF SSU
Options +FollowSymLinks -MultiViews
RewriteEngine On
# Make sure to change "test_site" to the subfolder you install ZC. If you use root folder, change to: RewriteBase /
RewriteBase /
# Deny access from .htaccess
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA,L]
#### EOF SSU
Looking at the HTML source for the new site, these are working correctly on the new store now. :)
You need to change the .htaccess file by hand when you change change the option "Categories as Directories". The URL you provided shows you did not change the .htaccess file to comment / uncomment the required lines in the .htaccess file when changing this setting.
Failure to update the .htaccess file will cause your store to do extra redirects (which SEs do not like) and which can slow down your sites performance. The correct URL for the setting (Add category parent to begining of URLs?: true, Show categories as directories in the URL?: false) is: "/nieuw/bordjes-brandblusser-c-60_62_70.html"
Bizarre behavior with ultimate SEO.
Add some items to the cart but then if I go to click on the individual items again (either from the shopping cart sidebox or from the shopping cart page itself), instead of bringing me to the appropriate product page, I get redirected to:
http://spritelygoods.com/product_info
the link is clearly trying to go to the product page: http://spritelygoods.com/index.php?m...edc58b86b894df
Have you seen this before?
to get into the site either use the product link above or make sure to add /index.php I have a placeholder index.htm file up right now to hopefully keep people out while I do final testing.
I've made it so you can test this on a mirror.
The please use www.spritelygoods.com/zencartv151 (but don't use the products linked on the front page - those all point to the root directory where the real shop lives (and that is currently down to maintenance).
If you browse/select products from the category tree or the best sellers, you can add one of them to the cart.
Thanks in advance for any guidance. I should note it works fine if I turn off Ultimate SEO URLs.
Looks like your rewritten urls almost work. But I see somthing I've only seen once before. When I hover my cursor on a category or product link and look at the bottom of my screen, the "hover" url shows as a dynamic url; not the rewritten url. Although actually clicking on the link goes to the rewritten url in the address bar.
When I "hover" on my links at prommart com, I see the rewritten url.
So something is wrong, not sure what. Are you certain your seo admin settings match your htaccess settings?
I;ve posted my htaccess file previously. My SEO settings on the mirror are:
Enable SEO URLs? true
Add cPath to product URLs? false
Add category parent to begining of URLs? true
Show categories as directories in the URL? true
Filter Short Words 0
Output W3C valid URLs (parameter string)? true
Enable SEO cache to save queries? true
Enable product cache? true
Enable categories cache? true
Enable manufacturers cache? true
Enable articles cache? true
Enable information cache? true
Enable automatic redirects? true
Choose URL Rewrite Type Rewrite
Enter special character conversions
Remove all non-alphanumeric characters? false
Enter PCRE filter rules for generated URLs
Reset SEO URLs Cache false
Enter pages to allow rewrite index, product_info, products_new, products_all, featured_products, specials, contact_us, conditions, privacy, reviews, shippinginfo, faqs_all, site_map, gv_faq, discount_coupon, page, page_2, page_3, page_4
just in case, the htaccess looks like this:
##### NOTE: Replace /yourdomain.com/yourzencartdirectory/ with the relative web path of your catalog in the "Rewrite Base" line below:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /zencartv151/
# Disable if using "Categories as Directories"
#RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)\.html$ $3-p-$4\.html?cPath=$2&%{QUERY_STRING} [R=301,L]
# Enable only if using "Categories as Directories"
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)\.html$ index\.php?main_page=product_info&products_id=$4&cpath=$2&%{QUERY_STRING} [L]
# Normal operation Ultimate SEO URLs
RewriteRule ^(.*)-p-([0-9]+)\.html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
# Disable if using "Categories as Directories"
#RewriteRule ^(.*)-c-([0-9_]+)\.html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
#RewriteRule ^(.*)-c-([0-9_]+)/$ $1-c-$2\.html [R=301,L]
# Enable only if using "Categories as Directories"
RewriteRule ^(.*)-c-([0-9_]+)/?\.html$ $1-c-$2/ [R=301,L]
RewriteRule ^(.*)-c-([0-9_]+)$ %{REQUEST_URI}/ [R=301,L]
RewriteRule ^(.*)-c-([0-9_]+)/$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
# Normal operation Ultimate SEO URLs
RewriteRule ^(.*)-m-([0-9]+)\.html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+)\.html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+)\.html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+)\.html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+)\.html$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]
# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]
# Handle when a resource is not found (404 Error Page)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=page_not_found&%{QUERY_STRING} [L]
I should mention the only difference between the mirror (which is living in a subdirectory of the main site) and the main site is the rewrite path line in the htaccess file. There is the equivalent htaccess file in the root also - both the main site and the mirror behave that way with the hover showing the dynamic url.
I've never seen that behavior before - the URLs not being generated for a page. Almost like something broke during execution. Do you happen to have any debug logs or messages in the web server logs? I did notice you do not have shopping_cart in the rewrite pages list - It should not matter, but I'll try mimicking your settings in one of my test stores tomorrow and see what happens.
I also noticed on your site Zen Cart is adding the uprid to the URL for product pages instead of the prid. I've only seen uprids used in section of the database pertaining to orders. I've never seen it added to the end of a product_info URL. If you switch back the the classic template does this still happen?
prid = 6, uprid=6:772c4cf4cfcfb000d9edc58b86b894df
Can you also tell me which version of PHP your server is using?
I have an idea of what the problem might be (the uprid is a big hint), and your answers to this question (and the ones in my last post) should help me narrow things down.
In the meantime change this setting (product links should work again): Enable automatic redirects? false
This setting is used to issue a 301 from dynamic URLs to static URLs - and should not negatively affect any pages (shopping cart page has a noindex, nofollow for SEs).
Looking in the logfiles I see files from today that are all very similar to each other:
As for the shopping_cart being excluded, that wasn't intentional. I left pretty much all settings for this addon as default from the install. I do not recall removing the shopping_cart page.Quote:
PHP Fatal error: 1062:Duplicate entry 'zc_***32characterstring***' for key 'PRIMARY' :: insert into zen_db_cache set cache_entry_name = 'zc_***32characterstring***',
cache_data = '***hugecharacterstring***=',
cache_entry_created = '1352311473' in /zencartdirectory/includes/classes/db/mysql/query_factory.php on line 120
Yes it happens both when Ultimate SEO is turned on and off and also with the default template (i've got the default template enabled right now)
Doing a file compare on the query_factory.php documents:
I notice some difference in spacing on code for certain lines, but I don't know if that is any cause for concern.
From the Ultimate SEO Install package:
From the original zencart install package (v1.5.1)Quote:
if(isset($queryCache) && $queryCache->inCache($query)) {
Quote:
if( isset($queryCache) && $queryCache->inCache($query) ) {
From the Ultimate SEO Install package:
From the original zencart install package (v1.5.1)Quote:
if($zf_cache AND $zc_cache->sql_cache_exists($zf_sql, $zf_cachetime)) {
The "return $obj" argument is not in the same order here:Quote:
if ( $zf_cache AND $zc_cache->sql_cache_exists($zf_sql, $zf_cachetime) ) {
From the Ultimate SEO Install package:
From the original zencart install package (v1.5.1)Quote:
if (sizeof($zp_result_array) > 0 ) {
$obj->EOF = false;
while (list($key, $value) = each($zp_result_array[0])) {
$obj->fields[$key] = $value;
}
} else {
$obj->EOF = true;
}
return $obj;
And lastly there is the following line that is located on different lines in the original file from the v1.5.1 install vs the document included in the Ultimate SEO package:Quote:
if (sizeof($zp_result_array) > 0 ) {
$obj->EOF = false;
while (list($key, $value) = each($zp_result_array[0])) {
$obj->fields[$key] = $value;
}
return $obj;
} else {
$obj->EOF = true;
}
" $obj->is_cached = true;"
I suppose I could try to port over what I think changed on the file for the Ultimate SEO plugin (near the end of the file) while leaving the rest to match the original zencart document...
Well I tried merging the file and of course it broke everything :P so i put it all back...
Server is running PHP 5.3.17 (Zend: 2.3.0)
Done. But it basically has disabled the Ultimate SEO URLs. It's using all dynamic URLs while set as false.Quote:
In the meantime change this setting (product links should work again): Enable automatic redirects? false
That error message in your logs looks VERY similar to this thread: PHP Fatal Error. You might want to give the fix from that thread a try.
URLs not being generated
First do a "repair" of the 'zen_db_cache' table using a tool such as phpmyadmin. This table being corrupted is most likely the cause of URLs not being generated on your pages.
The table 'zen_db_cache' is only used internally to cache SQL lookups by Zen Cart. You can safely "Truncate" this table after doing the repair. Additionally, you can disable Zen Cart SQL caching (not query cache) by using the following in your configure.php files: define('SQL_CACHE_METHOD', 'none'); if desired. I do use Zen Cart SQL caching and have not yet encountered this error under 1.51 *knocks on wood*.
Why does this matter? "Ultimate SEO URLs" will use Zen Cart SQL caching if enabled in 'configure.php'.
Shopping Cart
I think I've found the root cause for the product page redirecting to an invalid URL. Looks like in the past the built-in php parse_url and the Zen Cart uprid did not play well together. There was still some code to handle this from pre-2.200 releases. Try the following changes and let me know if they fix the problem for you.
In seo.url.php around line 410 change
toCode:case 'products_id':
switch(true) {
case ($page == FILENAME_PRODUCT_REVIEWS):
And around line 1454 changeCode:case 'products_id':
// Make sure if uprid is passed it is converted to the correct pid
$p2[1] = zen_get_prid($p2[1]);
switch(true) {
case ($page == FILENAME_PRODUCT_REVIEWS):
toCode:// damn zen cart attributes use illegal url characters
if ($this->is_attribute_string($this->uri)) {
$parsed_url = parse_url($this->uri);
$this->uri_parsed = parse_url($parsed_url['scheme']);
$this->uri_parsed['query'] = preg_replace('/products_id=([0-9]+)/', 'products_id=$1:' . $parsed_url['path'], $this->uri_parsed['query']);
} else {
$this->uri_parsed = parse_url($this->uri);
}
Code:// damn zen cart attributes use illegal url characters
if ($this->is_attribute_string($this->uri)) {
$parsed_url = parse_url($this->uri);
if(array_key_exists('scheme', $parsed_url) && zen_not_null($parsed_url['scheme'])) {
$this->uri_parsed = parse_url($parsed_url['scheme']);
}
else {
$this->uri_parsed = $parsed_url;
}
$this->uri_parsed['query'] = preg_replace('/products_id=([0-9]+):[^&]*/', 'products_id=$1', $this->uri_parsed['query']);
} else {
$this->uri_parsed = parse_url($this->uri);
}
So....I don't know what to make of this, but if I change my cache method to "file" then the whole shopping cart thing doesn't have a problem anymore. I'm still having that bizarre business when I hover over a link, it displays the dynamic URL at the bottom of the browser, but once navigated to, the URL in the header bar is an ultimate SEO re-written URL.
in a nutshell using file-type cacheing does not put the UPRID at the end of the product link when browsing from the shopping cart.
Would anything in the ADMINFOLDER/includes/functions/general.php contribute to this issue?
I have one other plugin that touches that file and I think I also noticed that the general.php file that is used for ultimate SEO did not match the one that came with the v151 zencart install.
I had to do a file merge to make sure I was able to still use the other plugin (Stocks by attribute)
I still see the uprid added to the end with file caching turned on in my test environments (and on your site). From what I've read this is normal behavior for the shopping cart page.
Just because you are redirected to the URL does not mean the URLs are being re-written inside Zen Cart. I suspect something is not quite right with the installation of this module in your site. I'd especially double check the auto-loader file and the zen_href_link function changes.
I'm not sure what stock-by-attributes changes, but the changes made for this plugin to functions_general are to remove the main_page parameter and add an XSS fix. These changes on the admin side should not affect the catalog side (they are not used by the catalog side).
I have completed the edits proposed and the shop appears to be functioning properly through the shopping cart :)
Thanks so much for your help and suggestions!
Yes, looks like your cart is now working properly. And special kudos to Ihungil for his patience and help on this support thread!
lhungil, First off thank you for helping me with my first issue (the PM you sent me helping me with my checkout pages)!
I have zen cart v1.5.1 and Ultimate SEO URL's, with the corresponding installation (v1.5.1). All is working fine except for one exception: it's a special characters in a category URL field.
I must not be thinking clearly. One of my clients has a category labeled as such: "CONTROL/ SHAPER". As you can see there is a forward slash here. Yeah I know it's bad to do this, but she wants it there if possible. So in my admin> config> SEO URL's I see a few fields that I think controls this:
1. Remove all non-alphanumeric characters? is set to true
2. Enter special character conversions. is set to: /=>-
First is this the way to convert this category issue? Second, I was confused as the the entry of #2 (above). You have this example: The formatMUST be in the form: char=>conv,char2=>conv2 which I think I am using properly. Any suggestions?
I've been thinking about re-visiting the filters for the next release to make things a little cleaner. Suggestions are welcome.
This is the last filter (third) run over the generated URLs. If enabled: All non alpha-numerical characters are removed (including the -). If disabled it only strips punctuation (again this includes -).
This is the second filter run over the generated URLs. This was left from a previous version to allow simple character conversions.
The most powerful (and first filter run) is the PCRE filter. This allows you to convert most any character or phrase into another character or phrase. For example: '\\/=>and' would convert "CONTROL / SHAPER" to "CONTROL and SHAPER" in the URL.
Just a heads up for everyone. I am currently working on the next release of this plugin. The next release is quite ambitious and includes all the patches, fixes, and updates released since 2.207 along with a number of other changes including a complete rewrite of the installation, upgrade, and uninstall scripts. There is no ETA at this time, but when I am ready for some people to BETA test, I will post more information here.
Looking forward to see what you have!
There are a large number of changes coming to the next release.
Don't Panic!
Installation, Upgrades, and Removal
The largest change from previous versions is a complete rewrite of the installation, upgrade, and removal process. With the new system you will have feedback provided on the top of the browser window letting you know if the installation was successful or failed (and why it failed in many cases).
The installer handles detecting which version you have installed (supports back to version 2.150) and makes the needed database and setting changes for you automatically. Yes, it actually migrates your old settings for you! So no more losing settings during an upgrade!
In addition by commenting a small block of code and uncommenting another block the installer can be turned into an uninstaller. No more struggles if you need to re-install or remove this plugin.
All previous patches
The next version will include all the patches released since version 2.207 - including some you may have never known existed!
Automatic parsing of zen_href_link "static" pages
How does this affect you? Among other things (and pages) the module will automatically handle those pesky EZ-Pages "Internal URL" links and generate the appropriate link based upon your settings.
Configuration
The next version includes a simplified configuration and by popular demand some new options (such as additional URL Formats)!
Beta Testers
If you wish to beta test the next release you can send me a PM here with:
- Your email address
- A note saying you understand the BETA version may break your site
- A note stating you will not share the link to the BETA version with others
Translators
Due to the large number of changes made in this version new translations are needed. Anyone who wishes to provide translation should let me know in a PM along with an email address where I can send the English language file.
Thank You in Advance!
Thank You all BETA testers!
Plugin Features
- You can choose the extension filenames will end with (.html, .htm). Entering nothing will result in no extension being added.
- You can choose to show just the page / product / category name or the parent category before the product / category name.
- You can choose to display your categories as directories (short or full).
- You can configure string replacements using PCRE rules (regexp).
- You can configure (single byte) character replacements.
- You can choose to strip all non-alphanumerical characters or just "special" characters (dash is excluded).
- Any spaces in names will be replaced with a dash.
- You can choose to "filter" out short words.
- You can select which page types will have rewritten URLs.
- You can enable automatic 301 redirects from Zen Cart dynamic URLs to generated URLs.
- You can choose to have generated URLs cached. Caching is supported at multiple levels including the use of memory and database backends.
Plugin Compatibility
Zen Cart 1.3.9h & 1.5, MySQL 5.0/5.5, PHP 5.2.17+/5.3/5.4
If running Zen Cart 1.3.9h it is not recommended to run with Zen Cart SQL Caching enabled. Support for running Zen Cart 1.3.9h with this option enabled will not be provided. It is strongly recommended to upgrade to Zen Cart 1.5 if you use this feature.
If you are running a version of this plugin prior to version 2.150 it is recommended you uninstall the old version of the plugin including all database entries prior to installing this version. While most settings will be automatically upgraded the installation scripts have not been tested against versions prior to 2.150.
New Enhancements (since the last version)
- Updated all configuration options to provide better clarity.
- Added some additional URL Rewrite modes (including short categories as directories).
- New .htaccess sample to support new modes.
- Moved the product type code into an init_script to reduce the number of affected core files.
- Added the ability to enable the EZ-Pages URL cache.
- If the "page" variable contains "index.php?" and "main_page=" the "page variable will be parsed to determine the appropriate destination page and paramaters. You no longer need to edit internal links on EZ-Pages.
- The generation of the "cPath" parameter is handled automatically.
- Moved all language specific items into the language folder.
- Simplified the code used to hook into zen_href_link.
- Created installation, upgrade, and removal scripts. These handle automatically upgrading from older versions without the loss of settings (supports upgrading from version 2.150+).
- When SEARCH_ENGINE_FRIENDLY_URLS is enabled htmlspecialchars is run over the generated URL with mode and characterset specified (PHP 5.4 compatibility).
- Provided affected files for Zen Cart 1.3.9h.
Bugs Addressed (since the last version)
- Product links on the shopping_cart strip out the uprid to allow rewritten links to work.
- "Buy Now" and "Add Selected Products to Cart" on product listing pages will now work.
- Fixed some issues with generating the EZ-Pages cache.
- Removed obsolete language files.
When will the new version be available?
I am planning to upload the new version on 16 Nov 2012. Those wishing to test the new version prior to when it appears in the plugins section of the Zen Cart website are advised to apply to be BETA testers.
Just downloaded and installed the latest 2.210 on my main site in signature. Smooth install, everything appears to be working. Great job, thanks!
Steve
Lhungil:
Uploaded to my mirror for testing.
Followed installation instructions - the only file that required merging was the general.php file.
Under the admin:
When I click on Enable EZ Pages Cache: It gives me 2 radio buttons with the same choice...
[QUOTE]
Enable ez pages cache?
This will turn off caching for ez pages.
enable-ez_pages
enable-ez_pages
[\QUOTE]
When adding something to the cart, I got a 404 error. I will take the mirror out of maintenance mode if you care to have a look.
http://www.spritelygoods.com/zencartv151
First thank you for reporting the issue(s). Unfortunately a couple of bugs made it past the last BETA Test rounds.
Yup, known bug. Should not affect anything adversely. It's fixed in the current BETA.
Yup, found this one early this morning while I was working on some new 301 redirect code. Another item fixed in the current BETA. I'll send you an invite to the BETA version.Quote:
When adding something to the cart, I got a 404 error. I will take the mirror out of maintenance mode if you care to have a look.
:) invite received, I'll update again and poke around
Zen Cart v1.5.1 + ultimate_seo_urls_210
Product details page, Comment Link returns a wrong address
http://www.domain.com/category-c-1/p...1.html?cpath=1
Have been fixed...
Hoping to finish off changes sometime tonight and then upload the next version. There are still open BETA test slots for those interested. There have been a number of fixes, changes, and enhancements added by the BETA.
Redirect Changes
Version 2.211 includes a re-code of the automatic 301 redirect code (while this is not needed as canonical links are generated some people prefer 301's when the URL changes). This option can be enabled or disabled in the configuration.
In older versions, when enabled, Zen Cart parameter based URLs (in the list of pages to rewrite) were redirected to the URLs generated by "Ultimate SEO URLs" for the same page.
In version 2.211, when enabled, when URLs change (for pages in the list of pages to rewrite) the old URLs are redirected to the new URLs. This includes name changes, option changes, and Zen Cart parameter based URLs.
Some examples
You change the configuration settings to "URLS end with: ".
Requests for "/product-name-p-1.html" will generate a 301 Redirect to "/product-name-p-1".
You change the name of a manufacturer (or category or product).
Requests for "/old-mfg-name-m-1" will generate a 301 Redirect to "/new-mfg-name-m-1".
I have added the newest version of Ultimate Seo to a new 1.51 zen cart and I am getting the following error message in my admin.
Filesystem Error: Unable to access admin/includes/extra_datafiles/seo.php'. Please make sure you uploaded the file and your webserver has access to read the file!
Filesystem Error: Unable to access admin/includes/functions/extra_functions/seo.php'. Please make sure you uploaded the file and your webserver has access to read the file!
Filesystem Error: Unable to access admin/includes/languages/english/extra_definitions/seo.php'. Please make sure you uploaded the file and your webserver has access to read the file!
Ultimate SEO installation failed!
I change all the permissions and checked the files and there are loaded fine but the message still stands. The db is as the config file initiated.
I found that I had to change my admin name back to admin(which I ahd changed to another name) and add the new name to the FS_ADMIN, 'store name/new admin name'. After I change this the program installed correctly and the error message went away.
With the new 1.5 and 1.51 you should not have to change this config define but when adding this program it was necessary.
As noted earlier in this thread some bugs did make it past the BETA test of version 2.210. If you need the newest features, you may wish to apply to be a BETA tester. There are instructions earlier in this thread :)
The location of the admin folder is read from the admin configure.php ('DIR_FS_ADMIN') during install / upgrade. If you are running 1.3 or upgrade from 1.3 to 1.5 you should check and make sure this entry in the admin configure.php points to the correct folder. Zen Cart 1.5 does not set this statically.
This was an issue with your Zen Cart configuration, not this plugin.
Quote:
Originally Posted by mhawkins
I found that I had to change my admin name back to admin(which I ahd changed to another name) and add the new name to the FS_ADMIN, 'store name/new admin name'. After I change this the program installed correctly and the error message went away.
With the new 1.5 and 1.51 you should not have to change this config define but when adding this program it was necessary.
I posted the fix so that others with a similiar problem will know where to look. Sometimes we forget to look beyond the new addon.
Help... I did backup before installing and could not get it to install properly and then my site went blank.
Now when I did restore it; it's still blank and I took out the .htaccess modifications.
Any ideas?
heteromorphic.com/zencart
Hi,
You should state what version of zencart your are using and what version of Ultimate SEO you tried to install. I can tell you that this is a very easy, straight-forward plugin to install and it works. The only "tricky" part might be the htacess file, indicating the location of your zencart. For your installation, it looks like it should be the following, since your zencart appears to be in a subfolder named "zencart":
Options +FollowSymLinks
RewriteEngine on
RewriteBase /zencart/
If your zencart is in the top level domain, the installation would be this, with just a single /:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
But it sounds like you have way more issues than just a failed Ultimate SEO problem. When you say you backed-up, what does that mean (what did you do)?
Thank you for your prompt response. I am running zen 1.3.9h and did the most recent download for Ultimate SEO from this site.
I did a "Database Backup Manager - MySQL" backup before installing in case I needed to go back as I'm no zen expert so I always do a backup to be safe.
When doing the above after I put in /zencart/ the entire site showed blank (as it does now when on the /zencart part) so I "restored" back to my backup and deleted the additions to the .htaccess file and it's still blank which I can't figure out since the entire site was fine before I tried to install this and now it's still blank?
I would think the restore would take out what I did and it would work again?
And I'm not sure I understand this if I try to install again:
4. Log into the admin side of your Zen Cart installation using a web browser. Yes, log into your admin interface now before continuing. Copy over the file from "4 install/your_admin_folder" to your Zen Cart installation under your admin folder.
Where do you copy anything from the admin panel? Or is it still via FTP (which is what I did originally).
Apologies... I wonder if it has to do w/what my .htaccess already had from my server - I have to idea what it says/does, but with the new code it would be:
suPHP_ConfigPath /hsphere/local/home/heteromo/heteromorphic.com
# -FrontPage-
RewriteEngine on
Options -Indexes
<Files shtml.dll>
order allow,deny
deny from all
</Files>
<Files _vti_inf.html>
order allow,deny
deny from all
</Files>
<Files postinfo.html>
order allow,deny
deny from all
</Files>
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.heteromorphic.com
AuthUserFile /hsphere/local/home/heteromo/heteromorphic.com/_vti_pvt/service.pwd
AuthGroupFile /hsphere/local/home/heteromo/heteromorphic.com/_vti_pvt/service.grp
Redirect 301 /Merchant2/merchant.mvc http://heteromorphic.com/mm5/merchant.mvc
RewriteEngine on
RewriteRule ^is_working/$ ./Merchant2/4.16/features/timeline.php?check_script=1
RewriteRule ^(yqqftco)(.*)/(.*)\.html$ ./Merchant2/4.16/features/timeline.php?name=$3&word=$2&indx=$1 [L]
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
###############################################################################
# Start Ultimate SEO URLs
###############################################################################
# Handles the new URL formats
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$4&cpath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)(.*)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
# Original (unchanged) URL formats
RewriteRule ^(.*)-m-([0-9]+)(.*)$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+)(.*)$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+)(.*)$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+)(.*)$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+)(.*)$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]
# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]
The idea here is that you log in to admin panel THEN ftp over those last 4 install files. Then click on any admin page, such as the admin home, and you should see a "success" message in your admin...or an error msg with hopefully an indication of the problem. I've never seen the error msg.
If you didn't ftp up those final files during our install, that may be some of the problem.
Another issue is that I'm using zc 1.5.1 so am not certain how 1.3.9h works. You didn't try uploading the 1.5.0/1.5.1 files, did you?
EDIT: Just saw your htaccess code. Don't know how that may affect Ultimate SEO. Ihungil is now leading the support for this plugin and he should be around soon and may have some thoughts.
EDIT: I just recalled that the Ultimate SEO URL support here is really for zc versions 1.5.0/1.5.1, which I believe is the Ultimate SEO URL version support Ihungil is providing. So didn't want to volunteer him for something outside of his area.
I must say that your extra htaccess code looks strange to my eye for a top-level htaccess. Some of it looks to me more like an interior htaccess file. Did you put everything in the proper htaccess file?
The rest of your code I haven't seen before. Who or what is your server?
I have websitesource and I know they added code when I switched from MivaMerchant to Zen to make sure old links were redirected but I didn't do so I don't know how to edit.
I only installed the file for the 3.9 version...
The blank issue / website gone occurred after I added the .htacess code as instructed and never came back even when I deleted the new code and then restored to my backup that I did earlier when the site did run? Is that common once you run the new .htaccess file that it won't come back even when switched?
I never got the success or fail message once I logged into my admin panel and I never could find it in the config dropdown... I can still get in my admin panel, but that is about it :(
You should probably not have multiple "RewriteEngine on" in the .htaccess file. As SPH noted the .htaccess file from "Ultimate SEO URLs" should be installed in the same folder as your Zen Cart installation (what folder is Zen Cart installed in?). It looks like you merged it with a top level server config / .htaccess.
Nope, this is very uncommon. What do you see in your log files? http://www.zen-cart.com/content.php?124-blank-page
This only shows if you log into the admin, then FTP the last file, then click a link in the admin (before the login timeout).
Try going through the installation steps again. No config usually means either the language file is missing (make sure your language in admin is set to English - I'm still waiting for people to translate) - or - the installation script is not being loaded.
I apologize in advanced - slightly confused... I think that was on my top server or would you mean the /zencart folder?
And maybe dumb question.... when it said admin folder it meant that and not the "custom" folder right?
PHP Fatal error: Cannot redeclare zen_js_zone_list() (previously declared in /hsphere/local/home/heteromo/heteromorphic.com/zencart/includes/functions/functions_general.php:1408) in /hsphere/local/home/heteromo/heteromorphic.com/zencart/includes/functions/html_output.php on line 194Quote:
Nope, this is very uncommon. What do you see in your log files? http://www.zen-cart.com/content.php?124-blank-page
That is the only one I could find - would that make it blank?
Yes I did that, but nothing showed up.Quote:
This only shows if you log into the admin, then FTP the last file, then click a link in the admin (before the login timeout)..
Thank you.Quote:
Try going through the installation steps again. No config usually means either the language file is missing (make sure your language in admin is set to English - I'm still waiting for people to translate) - or - the installation script is not being loaded.
Do you think that PHP error is the issue or shoud I try to run back up again?
Yes - that would cause a blank page. There is no "zen_js_zone_list()" in functions_general.php from a stock Zen Cart 1.3.9h install. Are you running Zen Cart 1.3.9h? If so you may want to revert back to the one supplied in the Zen Cart 1.3.9h download.
There is no copy of functions_general.php supplied by "Ultimate SEO URLs" for Zen Cart 1.3.9h. When following step 1 in the installation instructions, did you copy over (or merge) the contents of only the "1_affected_files_139h" folder?
Where did you install Zen Cart? Is it on the root of the server ("http://heteromorphic.com/") or in a folder ("http://heteromorphic.com/zencart/")? Where is the .htaccess file you posted found on the server? Can you post a copy of your "includes/configure.php" and "admin/includes/configure.php" files (use CODE tags please - and remove any database user / password information)
no; i have several other modules installed. I did see another post about that error here but I'm not sure what they are talking about as a resolution: http://www.zen-cart.com/showthread.p...js_zone_list()
yesQuote:
There is no copy of functions_general.php supplied by "Ultimate SEO URLs" for Zen Cart 1.3.9h. When following step 1 in the installation instructions, did you copy over (or merge) the contents of only the "1_affected_files_139h" folder?
I believe it was installed on heteromorphic.com/zencart. The .htaccess file is on the root for sure (heteromorphic.com).Quote:
Where did you install Zen Cart? Is it on the root of the server ("http://heteromorphic.com/") or in a folder ("http://heteromorphic.com/zencart/")? Where is the .htaccess file you posted found on the server? Can you post a copy of your "includes/configure.php" and "admin/includes/configure.php" files (use CODE tags please - and remove any database user / password information)
my includes/configure.php is blank?
admin/includes/configure.php isn't there? Very confused.
Nevermind... just had to fix permissions on control panel to view. Not sure how to "code" - please advise. Thanks!
the 2nd one isn't there - just the config.seo files are there...
First one is:
<?php
/**
* @package Configuration Settings circa 1.3.9
* @copyright Copyright 2003-2010 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* File Built by zc_install on 2011-02-20 07:13:15
*/
/*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
/*************** The 2 files should be kept separate and not used to overwrite each other. ***********/
// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
define('HTTP_SERVER', 'http://heteromorphic.com');
define('HTTPS_SERVER', 'http://heteromorphic.com');
// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');
// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/zencart/');
define('DIR_WS_HTTPS_CATALOG', '/zencart/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
define('DIR_WS_PHPBB', '/');
// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/hsphere/local/home/heteromo/heteromorphic.com/zencart/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'wzc_');
define('DB_SERVER', 'mysql8.websitesource.net');
define('DB_SERVER_USERNAME', REDACTED);
define('DB_SERVER_PASSWORD', REDACTED');
define('DB_DATABASE', 'heterom_zencart');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');
// for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage
// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'file');
define('DIR_FS_SQL_CACHE', '/hsphere/local/home/heteromo/heteromorphic.com/zencart/cache');
// EOF
After you click "REPLY" on the forums clicking "GO ADVANCED". This will give you extra options in the editor.
Do not use a "control panel" to copy files to your server. This is known to cause problems including corrupted files. Zen Cart (and all Zen Cart modules) should be installed directly using a SFTP, FTPS, or FTP client.
Zen Cart requires both configuration files, so they are there somewhere. If you renamed your "admin" folder, which is recommended after installing, then replace the word "admin" with the name of your Zen Cart "admin" folder.
The configuration you posted for "includes/configure.php" is missing some quotes around the DB username / password. If you copied this from the server and did not edit to replace the username / database with dummy values you should fix the quotes. The "store" configure.php looks okay otherwise at a glance (I mostly wanted to see where you installed various Zen Cart components).
First and foremost, are you running Zen Cart 1.3.9h? I am not supporting this module on older versions.
If you are running Zen Cart 1.3.9h, I'm guessing the store has been upgraded from previous versions and some of the merges were not successful. Use a tool such as WinMerge or BeyondCompare to see what is different in your store than a stock 1.3.9h store and go from there. Your copy of "includes/functions/functions_general.php" is outdated and needs to be upgraded if you are running 1.3.9h.
As per the installation instructions the sample .htaccess file goes in the location you installed Zen Cart. So in your case "heteromorphic.com/zencart/.htaccess" not in the root "heteromorphic.com/.htaccess". Please adjust accordingly.
My server did the install as a fresh 1.3.9.h for me but they aren't upgrading so I would have to do. Not being an expert, do you know anyone who offers that upgrading service for a decent price by chance? I would like to upgrade but make sure all my mods stay in tact too :)
I did use ftp, but I was accessing those you requested from control panel just to copy/paste the code since I was at another job at the time... but yes, always do from ftp when uploading files. The code - the quotes are there - just deleted when i redacted those fields...
I ended up restoring back from my entire site so I at least have it back online for now; but really need help with making it SEO friendly. Would you recommend not using this one until I can get upgraded or any other version that may work better with 1.3.9.h for now until I can upgrade versions?
I'm afraid to try and re-install again and have the same issue :(
Thanks for all the help!
Understandable. Merging files is not always simple. Did you try replacing the functions_general.php with the one from Zen Cart 1.3.9h? Just to see what happens?Quote:
I'm afraid to try and re-install again and have the same issue :(
When you have a clean Zen Cart installation (no plugins or modifications) you can literally just drag and drop the replacement files. This works well in my 1.3.9h test environment (clean install w/ DEMO database - no other plugins or modifications).
Compatibility
Zen Cart 1.3.9h & 1.5, MySQL 5.0/5.5, PHP 5.2.17+/5.3/5.4
If running Zen Cart 1.3.9h it is not recommended to run with Zen Cart SQL Caching enabled. Support for running Zen Cart 1.3.9h with this option enabled will not be provided. It is strongly recommended to upgrade to Zen Cart 1.5 if you use this feature.
If you are running a version of this plugin prior to version 2.150 it is recommended you uninstall the old version of the plugin including all database entries prior to installing this version. While most settings will be automatically upgraded the installation scripts have not been tested against versions prior to 2.150.
New Enhancements (since the last version)
- To ensure URLs are W3C compatible, htmlspecialchars is run over all generated URLs with mode and character set specified (PHP 5.4 compatibility).
- Setting "Enable automatic rewrite" to true will automatically issue a 301 redirect for URLs not matching the output from zen_href_link.
- For linked products canonical links are generated when needed by using the prodct's master category id. The generated links are passed to Zen Cart's canonical link system.
- Added handling for copy / pasted "Internal URLs" in "EZ-Pages" to make migration to the new version easier for upgraded installations.
- Updated README_ENGLISH with more detailed installation steps.
- Changed the names of folders and moved some files around to make installation steps more clear.
- Updated the English language file to clarify the usage of "Enter pages to allow rewrite".
Bugs Addressed (since the last version)
- Added option to disable the EZ-Page cache.
- Page not requiring special handling of parameters will now correctly have the "extension" added to the end of the URL.
- Cleans up some obsolete configuration options which may still be present when upgrading from a previous version.
- New .htaccess sample handles product reviews when "Categories as directories" is enabled.
When will the new version be available?
I am planning to upload the new version on 21 Nov 2012. Those wishing to test the new version prior to when it appears in the plugins section of the Zen Cart website are advised to apply to be BETA testers.
Hi
Thanks for updating a great and useful mod.
The only way i can get this mod working is to comment out the line "Options +FollowSymLinks" in the .htaccess. I was wondering why? and whether it is safe to do this.
Thanks in advance Matt
Hi,
I have installed this plugin on 1.5.x carts without problem. What version of zencart are you using and what other plugins are you using? Also, how much other stuff is in your htaccess file?
A link or unlinked text address to you site might also help.
If you need to disable this line, your hosting provider does not allow you to enable the web server to follow symbolic links. Most *nix hosting platforms support this option. Should be safe to comment out this line (unless you use symbolic links to create an "alias" to another file or directory).
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:
Code:// Function to check the global cache settings
function usu_check_cache_options($action) {
$temp = explode('-', $action);
if(sizeof($temp) < 2) $temp[] = 'global';
$temp[1] = strtoupper($temp[1]);
switch($temp[0]) {
case 'enable':
$action = 'true';
if(SEO_USE_CACHE_GLOBAL == 'false' && $temp[1] != 'GLOBAL') {
zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $action), 'update', '`configuration_key`=\'SEO_USE_CACHE_GLOBAL\'');
echo '<div><span class="alert">' . sprintf(SEO_CONFIG_ADJUSTED, SEO_USE_CACHE_GLOBAL_TITLE, $action) . '</span></div>';
}
zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $action), 'update', '`configuration_key`=\'SEO_USE_CACHE_' . $temp[1] . '\'');
usu_reset_cache_data('true');
break;
case 'disable':
$action = 'false';
zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $action), 'update', '`configuration_key`=\'SEO_USE_CACHE_' . $temp[1] . '\'');
usu_reset_cache_data('true');
break;
default:
}
return $action;
}
Thanks, will look at this fix.
But a question: why would one want to disable the SEO cache in admin?
I didn't even know it was a problem.
EDIT: to answer my own question, perhaps someone will disable SEO cache just to see what it does, then cannot get it back?
Mostly for those who might "accidentally" turn this feature off.
With the SEO cache enabled some processing time and SQL Query time is saved at the expense of using more memory. The majority of installations will benefit from using the SEO cache to reduce PHP processing time when generating human friendly URLs.
While rare some people may have another layer of caching (such as caching portions of entire pages). Some may use the built in Zen Cart SQL cache (when enabled Ultimate SEO URLs uses this cache as well). Performance when generating URLs will vary depending upon the hosting environment where Zen Cart is installed (and thus this option exists for those who might benefit).
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!
Line 103 to the end of the file (basically the entire function).
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
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)
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.
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.
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:
This of course only removes the umlauts but does not replace them. I suspect the culprit inPHP 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
strtr, if I read correctly, doesn't handle multibyte characters right, which is kind of the thing utf8 is all about.PHP Code:
// Next run Character Conversion Sets over the string
if(is_array($this->filter_char)) $retval = strtr($retval, $this->filter_char);
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.
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.
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:
To: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';
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();
}
Yikes.
Not sure what is going on but while checking my main shop today I noticed that while trying to browse to products, I am getting an error requesting that the page be refreshed and try again. I can't figure out what is going on.
Error log is as follows:
[CODE]
[29-Nov-2012 02:18:49 UTC] PHP Fatal error: 1:Can't create/write to file '/tmp/#sql_1d81_0.MYI' (Errcode: 30) :: select pov.products_options_values_id,
pov.products_options_values_name,
pwas.quantity,
pa.*
from zen_products_attributes pa, zen_products_options_values pov, zen_products_with_attributes_stock pwas
where pa.products_id = '28'
and pa.options_id = '2'
and pa.options_values_id = pov.products_options_values_id
and pwas.stock_attributes = pa.products_attributes_id
and pov.language_id = '1' order by LPAD(pa.products_options_sort_order,11,"0"), pov.products_options_values_name in /Zendirectory/includes/classes/db/mysql/query_factory.php on line 120
[\CODE]
Any ideas? This happens with every product I've tried so far, and it is also happening on my mirror. I have not made any recent changes.
I should note it seems there is no \tmp directory anywhere on my server that I can see - is this something I need to create? the site has been up and running fine for a few weeks with no issues.
Looks like there might have been some issues server-side. I've got my host looking into it.
Not exactly sure, something tripped something else and the server hid/disabled/made read only the tmp directory.
I was pretty sure I didn't see it when I went looking and then after I escalated the issue, the tmp dir made an appearance the next time I was in on FTP.
They admitted it was something on their side, but could not tell me what I could do to prevent it from occurring in the future, even after I asked.
sadly, it is doing it again and they've gone and escalated it to the sys admin. Hopefully they can figure out what's going on because it's killing my shop :(
Hi,
I've looked through the threads and didn't seem to find any info on how to do the below modification.
I'm looking to remove the "type" from the SEO URL; e.g. -c-, -p-, etc.
I've tried to update the .htaccess and the php file which sets up an array of them, but it didn't seem to work.
Anyone have some tips on how to accomplish this?
Regards.
To my knowledge, Ultimate SEO does not (at least, not yet) remove the -c and -p. If you want that function you'll need the CEON rewriter or the un-upgraded-for-zencart-1.5.x Simple SEO URL.
Thanks SPH for the direction.
I'll check into the CEON. It's not something I am familiar with but I'll do some reading to see how it works.
Regards!
Compatibility
Zen Cart 1.3.9h & 1.5, MySQL 5.0/5.5, PHP 5.2.17+/5.3/5.4
If running Zen Cart 1.3.9h it is not recommended to run with Zen Cart SQL Caching enabled. Support for running Zen Cart 1.3.9h with this option enabled will not be provided. It is strongly recommended to upgrade to Zen Cart 1.5 if you use this feature.
If you are running a version of this plugin prior to version 2.150 it is recommended you uninstall the old version of the plugin including all database entries prior to installing this version. While most settings will be automatically upgraded the installation scripts have not been tested against versions prior to 2.150.
New Enhancements (since the last version)
- Updated the installation and removal documentation including instructions and notes.
- Improved performance during the generation of links and canonical links for products.
- Updated language files to clarify usage of the available options.
- Updated warning messages used in the configuration menu to provide better feedback.
- Better handling of extensions (ex .html) during installation or when the plugin has been removed / uninstalled.
- No need to edit the .htaccess file when changing the URL Format.
- When changing "non text entry" options the URL cache is reset automatically.
Bugs Addressed (since the last version)
- Version 2.210+ Global "SEO" cache can be re-enabled in the admin configuration if previously disabled.
- Version 2.210+ Fixed redirect code for URLs containing characters requiring urlencode / urldecode.
- Version 2.210+ Initializes character and string filters before calling the code to generate the URL caches (if enabled).
Is it possible to update the .htaccess rewrite rule to remove the -c-, -p-, etc strings from the URL?
As stated by SPH, not at this time. Why?
You will notice for example the following line in the .htaccess file:
This line sends the URL generated by "Ultimate SEO URLs" to the Zen Cart dynamic URLs. So "something-something-something-c-6_119_32.html" becomes "index.php?main_page=index&cPath=6_119_32"Code:RewriteRule ^(.*)-c-(.*).html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
At the core "Ultimate SEO URLs" currently works by reducing the Zen Cart Dynamic URLs to the shortest form possible and then adding the title of the product, category, page, ez-page, etc. For example "index.php?main_page=index&cPath=" becomes "-c-" with the category title / name prepended. The same is try for how it handles products, pages, ez-pages, etc.
Thanks for the information.
I tried to update the .htaccess and plugin file, but was not successful.
Regards,
Jim