@delia, you'll need to pick up the changes associated with this (https://github.com/zencart/zencart/issues/4939) Zen Cart issue.
USU has, unfortunately, "jumped the gun" and has been tested with those now to-be-released changes.
Printable View
@delia, you'll need to pick up the changes associated with this (https://github.com/zencart/zencart/issues/4939) Zen Cart issue.
USU has, unfortunately, "jumped the gun" and has been tested with those now to-be-released changes.
Thanks - that's what I needed to know.
Looks like it's 158 and should be set in includes/init_inclludes/init_category.php line 33.
I have ultimate urls on 1.54 using for years now and preparing an upgrade to 1.5.8a.
Has anyone had any trouble installing on 1.5.8a?
Just making sure before I go further.
Thank you everyone.
I have ultimate urls on 1.54 using for years now and preparing an upgrade to 1.5.8a.
Has anyone had any trouble installing on ULTIMATE SEO V3 ON zen cart 1.58a?
Just making sure before I go further.
Thank you everyone.
I just removed the inveo/numinix version of SEO URLs and installed this one. Its mostly working very well, and my new links are ALMOST the same as my old ones. Examples:
old: https://www.pezcollectors.com/quasi-...e-3-9-pez-279/
new: https://www.pezcollectors.com/quasi-...e-39-pez-c-279
old: https://www.pezcollectors.com/nici-j...sheep-moc-4246
new: https://www.pezcollectors.com/nici-j...eep-moc-p-4246
The first example is just unfortunate as they land on the home page instead of the correct product. The second is a real problem as the link causes a HTTP ERROR 406.
While I can get google to update its links, there isn't much I can do about the rest of the internet.
Any suggestions on a good fix for this?
old htaccess in case helpfull:
Code:#
# This file was generated by Inveo Magic SEO URLs for ZenCart 6.2.00 - http://www.inveostore.com/
# 2006 - 2020, (c) Inveo s.r.o.
#
<IfModule negotiation_module>
Options -MultiViews
</IfModule>
<IfModule rewrite_module>
RewriteEngine On
RewriteBase /
### REQUIRE SSL ###
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301]
### REQUIRE SUBDOMAIN ###
RewriteCond %{HTTP_HOST} !^www.pezcollectors.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^dev\. [NC]
RewriteRule ^.*$ https://www.pezcollectors.com/$1 [R=301]
#Working around additional parameter - this one can not be unset in some cases by Core
RewriteCond %{QUERY_STRING} ^(.*)&buy=now
RewriteRule ^index.php$ https://www.pezcollectors.com/index.php?%1 [R=301,L]
#Stopping Rewrite for Performance reasons (if you are using custom Rewrite Rules remove this line)
RewriteRule ^.*(\.css|\.js|\.jpg|\.gif|\.png)$ - [L]
#shippinginfo - shipping
RewriteRule ^shipping$ index.php?main_page=shippinginfo [L,QSA]
#privacy - privacy
RewriteRule ^privacy$ index.php?main_page=privacy [L,QSA]
#conditions - conditions
RewriteRule ^conditions$ index.php?main_page=conditions [L,QSA]
#contact_us - contact us
RewriteRule ^contact\-us$ index.php?main_page=contact_us [L,QSA]
#site_map - sitemap
RewriteRule ^sitemap$ index.php?main_page=site_map [L,QSA]
#gv_faq - gv_faq - items
RewriteCond %{QUERY_STRING} ^item=([0-9]+)
RewriteRule ^gift\-certificate-faq$ index.php?main_page=gv_faq&faq_item=%1 [L,QSA]
#gv_faq - gv_faq
RewriteRule ^gift\-certificate-faq$ index.php?main_page=gv_faq [L,QSA]
#discount_coupon - discount_coupon
RewriteRule ^discount\-coupon$ index.php?main_page=discount_coupon [L,QSA]
#unsubscribe - unsubscribe
RewriteRule ^newsletter\-unsubscribe$ index.php?main_page=unsubscribe [L,QSA]
# page_X - static pages
RewriteRule ^page\-([0-9]+)$ index.php?main_page=page_$1 [L,QSA]
#logoff - log off
RewriteRule ^log\-off$ index.php?main_page=logoff [L,QSA]
#index
RewriteRule ^$ index.php?main_page=index [L,QSA]
#index - categories - pagination, ordering and filtering
RewriteCond %{QUERY_STRING} ^alpha-filter=([0-9]+)
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,9}([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)\-([a-z0-9]{2,3})$ index.php?main_page=index&cPath=$5&sort=$7&alpha_filter_id=%1&page=$6 [L,QSA]
#index - categories - pagination, ordering and manufacturers
RewriteCond %{QUERY_STRING} ^manufacturer=([0-9]+)
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,9}([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)\-([a-z0-9]{2,3})$ index.php?main_page=index&cPath=$5&sort=$7&filter_id=%1&page=$6 [L,QSA]
#index - categories - pagination, ordering, filtering and manufacturers
RewriteCond %{QUERY_STRING} ^manufacturer=([0-9]+)&alpha-filter=([0-9]+)
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,9}([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)\-([a-z0-9]{2,3})$ index.php?main_page=index&cPath=$5&sort=$7&filter_id=%1&alpha_filter_id=%2&page=$6 [L,QSA]
#index - categories
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,9}([a-z0-9\-]*)\-([0-9]+)/$ index.php?main_page=index&cPath=$5&sort=20a [L,QSA]
#index - categories - pagination
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,9}([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)$ index.php?main_page=index&cPath=$5&sort=20a&page=$6 [L,QSA]
#index - categories - pagination and ordering
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,9}([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)\-([a-z0-9]{2,3})$ index.php?main_page=index&cPath=$5&sort=$7&page=$6 [L,QSA]
#index - categories and no category - product info - buy now
RewriteCond %{QUERY_STRING} ^buy=now
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,10}([a-z0-9\-]*)\-([\:0-9a-z]*)$ index.php?main_page=index&products_id=$5&action=buy_now [L,QSA]
#index - categories and no category - product info - notify
RewriteCond %{QUERY_STRING} ^notify=add
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,10}([a-z0-9\-]*)\-([\:0-9a-z]*)$ index.php?main_page=product_info&products_id=$5&action=notify [L,QSA]
#index - categories and no category - product info - notify remove
RewriteCond %{QUERY_STRING} ^notify=remove
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,10}([a-z0-9\-]*)\-([\:0-9a-z]*)$ index.php?main_page=product_info&products_id=$5&action=notify_remove [L,QSA]
#index - categories and no category - product info
RewriteRule ^(([a-z0-9\-]*)\-([0-9]+)/){0,10}([a-z0-9\-]*)\-([\:0-9a-z]*)$ index.php?main_page=product_info&products_id=$5 [L,QSA]
#index - manufacturers
RewriteRule ^manufacturers/([a-z0-9\-]*)\-([0-9]+)/$ index.php?main_page=index&manufacturers_id=$2 [L,QSA]
#index - manufacturers - pagination
RewriteRule ^manufacturers/([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)$ index.php?main_page=index&manufacturers_id=$2&sort=20a&page=$3 [L,QSA]
#index - manufacturers - pagination, ordering and filtering
RewriteCond %{QUERY_STRING} ^alpha-filter=([0-9]+)
RewriteRule ^manufacturers/([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)\-([a-z0-9]{2,3})$ index.php?main_page=index&manufacturers_id=$2&sort=$4&alpha_filter_id=%1&page=$3 [L,QSA]
#index - manufacturers - pagination, ordering and categories
RewriteCond %{QUERY_STRING} ^category=([0-9]+)
RewriteRule ^manufacturers/([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)\-([a-z0-9]{2,3})$ index.php?main_page=index&manufacturers_id=$2&sort=$4&filter_id=%1&page=$3 [L,QSA]
#index - manufacturers - pagination, ordering, filtering and categories
RewriteCond %{QUERY_STRING} ^category=([0-9]+)&alpha-filter=([0-9]+)
RewriteRule ^manufacturers/([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)\-([a-z0-9]{2,3})$ index.php?main_page=index&manufacturers_id=$2&sort=$4&filter_id=%1&alpha_filter_id=%2&page=$3 [L,QSA]
#index - manufacturers - pagination and ordering
RewriteRule ^manufacturers/([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)\-([a-z0-9]{2,3})$ index.php?main_page=index&manufacturers_id=$2&sort=$4&page=$3 [L,QSA]
#specials - specials
RewriteRule ^specials/$ index.php?main_page=specials [L,QSA]
#specials - specials - pagination
RewriteRule ^specials/index\-([0-9]+)$ index.php?main_page=specials&page=$1 [L,QSA]
#reviews - reviews
RewriteRule ^reviews/$ index.php?main_page=reviews [L,QSA]
#reviews - reviews - pagination
RewriteRule ^reviews/index\-([0-9]+)$ index.php?main_page=reviews&page=$1 [L,QSA]
#product_reviews - product reviews - notify
RewriteCond %{QUERY_STRING} ^notify=add
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/$ index.php?main_page=product_reviews&products_id=$2&action=notify [L,QSA]
#product_reviews - product reviews - notify remove
RewriteCond %{QUERY_STRING} ^notify=remove
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/$ index.php?main_page=product_reviews&products_id=$2&action=notify_remove [L,QSA]
#product_reviews - product reviews
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/$ index.php?main_page=product_reviews&products_id=$2 [L,QSA]
#product_reviews - product reviews - pagination - notify
RewriteCond %{QUERY_STRING} ^notify=add
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)$ index.php?main_page=product_reviews&products_id=$2&page=$3&action=notify [L,QSA]
#product_reviews - product reviews - pagination - notify remove
RewriteCond %{QUERY_STRING} ^notify=remove
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)$ index.php?main_page=product_reviews&products_id=$2&page=$3&action=notify_remove [L,QSA]
#product_reviews - product reviews - pagination
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/index\-([0-9]+)$ index.php?main_page=product_reviews&products_id=$2&page=$3 [L,QSA]
#product_reviews_info - product reviews info notify
RewriteCond %{QUERY_STRING} ^notify=add
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/customers\-review\-([0-9]+)$ index.php?main_page=product_reviews_info&products_id=$2&reviews_id=$3&action=notify [L,QSA]
#product_reviews_info - product reviews info notify remove
RewriteCond %{QUERY_STRING} ^notify=remove
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/customers\-review\-([0-9]+)$ index.php?main_page=product_reviews_info&products_id=$2&reviews_id=$3&action=notify_remove [L,QSA]
#product_reviews_info - product reviews info
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/customers\-review\-([0-9]+)$ index.php?main_page=product_reviews_info&products_id=$2&reviews_id=$3 [L,QSA]
#product_reviews_write - product reviews write notify
RewriteCond %{QUERY_STRING} ^notify=add
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/write\-customers\-review$ index.php?main_page=product_reviews_write&products_id=$2&action=notify [L,QSA]
#product_reviews_write - product reviews write notify remove
RewriteCond %{QUERY_STRING} ^notify=remove
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/write\-customers\-review$ index.php?main_page=product_reviews_write&products_id=$2&action=notify_remove [L,QSA]
#product_reviews_write - product reviews write
RewriteRule ^reviews/([a-z0-9\-]*)\-([0-9]+)/write\-customers\-review$ index.php?main_page=product_reviews_write&products_id=$2 [L,QSA]
#products_new - products new - ordering
RewriteCond %{QUERY_STRING} ^display-order=([0-9]+)
RewriteRule ^new\-products/$ index.php?main_page=products_new&disp_order=%1 [L,QSA]
#products_new - products new
RewriteRule ^new\-products/$ index.php?main_page=products_new [L,QSA]
#products_new - products new - pagination and ordering
RewriteCond %{QUERY_STRING} ^display-order=([0-9]+)
RewriteRule ^new\-products/index\-([0-9]+)$ index.php?main_page=products_new&disp_order=%1&page=$1 [L,QSA]
#products_new - products new - pagination
RewriteRule ^new\-products/index\-([0-9]+)$ index.php?main_page=products_new&page=$1 [L,QSA]
#products_all - products all - ordering
RewriteCond %{QUERY_STRING} ^display-order=([0-9]+)
RewriteRule ^all\-products/$ index.php?main_page=products_all&disp_order=%1 [L,QSA]
#products_all - products all
RewriteRule ^all\-products/$ index.php?main_page=products_all [L,QSA]
#products_all - products all - pagination and ordering
RewriteCond %{QUERY_STRING} ^display-order=([0-9]+)
RewriteRule ^all\-products/index\-([0-9]+)$ index.php?main_page=products_all&disp_order=%1&page=$1 [L,QSA]
#products_all - products all - pagination
RewriteRule ^all\-products/index\-([0-9]+)$ index.php?main_page=products_all&page=$1 [L,QSA]
#featured_products - featured products - ordering
RewriteCond %{QUERY_STRING} ^display-order=([0-9]+)
RewriteRule ^featured\-products/$ index.php?main_page=featured_products&disp_order=%1 [L,QSA]
#featured_products - featured products
RewriteRule ^featured\-products/$ index.php?main_page=featured_products [L,QSA]
#featured_products - featured products - pagination and ordering
RewriteCond %{QUERY_STRING} ^display-order=([0-9]+)
RewriteRule ^featured\-products/index\-([0-9]+)$ index.php?main_page=featured_products&disp_order=%1&page=$1 [L,QSA]
#featured_products - featured products - pagination
RewriteRule ^featured\-products/index\-([0-9]+)$ index.php?main_page=featured_products&page=$1 [L,QSA]
#login - login
RewriteRule ^account/login$ index.php?main_page=login [L,QSA]
#login - create
RewriteRule ^account/create$ index.php?main_page=create_account [L,QSA]
#login - create successful
RewriteRule ^account/created\-successful$ index.php?main_page=create_account_success [L,QSA]
#password_forgotten - password forgotten
RewriteRule ^account/send\-password$ index.php?main_page=password_forgotten [L,QSA]
#account - account
RewriteRule ^account/$ index.php?main_page=account [L,QSA]
#account_edit - account - edit
RewriteRule ^account/edit$ index.php?main_page=account_edit [L,QSA]
#account_password - account - change password
RewriteRule ^account/change\-password$ index.php?main_page=account_password [L,QSA]
#account_history - account - history
RewriteRule ^account/orders/$ index.php?main_page=account_history [L,QSA]
#account_history_info - account - history info
RewriteRule ^account/orders/view\-([0-9]+)$ index.php?main_page=account_history_info&order_id=$1 [L,QSA]
#address_book - account - address book
RewriteRule ^account/address\-book/$ index.php?main_page=address_book [L,QSA]
#address_book_process - account - address book add
RewriteRule ^account/address\-book/add\-address$ index.php?main_page=address_book_process [L,QSA]
#address_book_process - account - address book edit & delete
RewriteCond %{QUERY_STRING} ^action=(edit|delete)
RewriteRule ^account/address\-book/entry\-([0-9]+)$ index.php?main_page=address_book_process&%1=$1 [L,QSA]
#account_newsletters - account - newsletters
RewriteRule ^account/newsletters/$ index.php?main_page=account_newsletters [L,QSA]
#account_notifications - account - notifications
RewriteRule ^account/notifications/$ index.php?main_page=account_notifications [L,QSA]
#shopping_cart - shopping cart
RewriteRule ^shopping\-cart/$ index.php?main_page=shopping_cart [L,QSA]
#checkout_shipping - checkout shipping
RewriteRule ^checkout/shipping$ index.php?main_page=checkout_shipping [L,QSA]
#advanced_search - advanced search
RewriteRule ^search/$ index.php?main_page=advanced_search [L,QSA]
#advanced_search_result - advanced search result
RewriteRule ^search/results$ index.php?main_page=advanced_search_result [L,QSA]
#page - ezpages - chapters
RewriteRule ^pages/([a-z0-9\-]*)\-([0-9]+)\-([0-9]+)\.html$ index.php?main_page=page&id=$2&pos=v&chapter=$3 [L,QSA]
#page - ezpages
RewriteRule ^pages/([a-z0-9\-]*)\-([0-9]+)\.html$ index.php?main_page=page&id=$2&pos=v&chapter=0 [L,QSA]
</IfModule>
### ALTERNATE EXPIRES CACHING ###
Header unset ETag
FileETag None
ExpiresActive On
ExpiresDefault "access plus 8 days"
ExpiresByType image/x-icon "access plus 30 days"
ExpiresByType application/x-javascript A2592000
ExpiresByType text/css "access plus 8 days"
ExpiresByType text/html "access plus 24 hours"
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/jpg "access plus 30 days"
ExpiresByType image/jpeg "access plus 30 days"
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=2592000, public"
</FilesMatch>
### GZIP COMPRESSION ###
#AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xhtml+xml
#AddOutputFilterByType DEFLATE application/x-javascript application/javascript text/javascript text/css
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
<Files ".ht*">
deny from all
</Files>
#ErrorDocument 404 http://www.pezcollectors.com/
Like that .htaccess indicates in its comments, the .htaccess is not for Ultimate SEO URLs, but another type:
# This file was generated by Inveo Magic SEO URLs for ZenCart 6.2.00 - http://www.inveostore.com/
Have you updated the .htaccess to include the USU-required RewriteRules?
Ya, I have the new rules in and it IS working fine. Bummer there isn't a work around, but I get it. Small bit of pain to get out from a weird evil paid for mod that was limiting my PHP version. Thank you very much!
I'm trying to get a top level categories page working outside the index. USU doesn't seem to have a function to deal with index.php?main_page=index&cPath=0
I added RewriteRule ^categories$ index\.php?main_page=index&cPath=0 [L] to custom 301 redirects and IF I turn off enable automatic redirects in config I can use either path to get to the categories page. But I can't force the URL to be https://dev.pezcollectors.com/categories and if I turn on enable automatic redirects in config either path just defaults to the home page. I also tried adding categories to limit alternate URLs, but it didn't change anything.
Suggestions?
This is a great mod and thank you to all those who have worked on it!!
I am running it on a v.1.5.8 site and wondered if it is possible to remove the product model # in the URL so that the URL just includes the product name.
Thanks in advance for your help!
Thanks for your reply lat9....
Maybe I have misunderstood the syntax. For example what I see for a URL for my product Knick Knack - Merry Moments is knick-knack-merry-moments-p-2499.html The p-2499 is the product model and product id. This is the part I would like to remove from the URL.
Hope this makes more sense.
Thanks for your reply lat9 and for letting me know about this is how the entire mod works.
I appreciate your help!
I apologize if this has been covered before....but I could not find the answer to this question. I am running v.1.5.8
After installing USU several weeks back (and using the included .htaccess file) Google is not indexing over 2800 pages on my site (most of my site). The reason from Google is "Alternate Page With Proper Canonical Tag" is the reason given.
In Admin I have set Enable Alternate URL's to True and set Enable Automatic Redirects to True which should set the 301 redirects. Can someone shed some light on why Google is not indexing???
Thanks in advance for your help,
Jeff
@NWCE, could you provide a link to the site? Send it to me via PM if you don't want to publish "to the world".
Thanks lat9 for your help. I have sent you a PM
what about zc 2 and higher php levels. It's definitely working on 8.3 but generating a error logs. I just reduced the level to 8.2 because I keep running into other issues on 8.3. The biggest offender seems to be classes/usu.php on the product listing page.
Here's an example:
#0 [internal function]: zen_debug_error_handler()
#1 /includes/functions/functions_strings.php(335): preg_replace()
#2 /includes/classes/usu.php(968): zen_clean_html()
#3 /includes/classes/usu.php(628): usu->filter()
#4 /includes/classes/usu.php(385): usu->get_product_name()
#5 /includes/classes/usu.php(223): usu->parse_parameters()
#6 /includes/classes/observers/UsuObserver.php(59): usu->href_link()
#7 /includes/classes/traits/NotifierManager.php(87): UsuObserver->update()
#8 /includes/functions/html_output.php(18): base->notify()
#9 /includes/modules/classicBasic2/product_listing.php(214): zen_href_link()
#10 /includes/templates/template_default/templates/tpl_modules_product_listing.php(10): include('/home/xxxxxx/...')
#11 /includes/templates/template_default/templates/tpl_index_product_list.php(99): require('/home/jadsjams/...')
#12 /includes/modules/pages/index/main_template_vars.php(232): require('/home/xxxx/...')
#13 /includes/templates/classicBasic2/common/tpl_main_page.php(108): require('/home/zzxzxx/...')
#14 /index.php(94): require('/home/xxxxxx/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/functions/functions_strings.php on line 335.
Have no clue why it's giving you that, but I can confirm usu-3.1.0 working fine on my zc 2.0.1 dev site without errors.
PHP Version 8.3.9
sigh. Well, I can tell you that none of the sites upgraded to 2.0 with the same template has this issue except the one with ultimate.
But also I can't seem to trigger this warning by accessing any elements on the product listing page. I truly don't understand the warnings - there are actually 3 in the one error log but all similar. Each refer to the image first. For full clarity and in hopes someone can better understand what this is about, I'll post the full file:
Code:[01-Aug-2024 22:31:59 UTC] Request URI: /blues-c-20/bmz_cache/1/103_1722jpg.image.92x80.jpg, IP address: 20.112.85.84, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/functions/functions_strings.php(335): preg_replace()
#2 /includes/classes/usu.php(968): zen_clean_html()
#3 /includes/classes/usu.php(628): usu->filter()
#4 /includes/classes/usu.php(385): usu->get_product_name()
#5 /includes/classes/usu.php(223): usu->parse_parameters()
#6 /includes/classes/observers/UsuObserver.php(59): usu->href_link()
#7 /includes/classes/traits/NotifierManager.php(87): UsuObserver->update()
#8 /includes/functions/html_output.php(18): base->notify()
#9 /includes/modules/classicBasic2/product_listing.php(214): zen_href_link()
#10 /includes/templates/template_default/templates/tpl_modules_product_listing.php(10): include('/home/xxxxxx/...')
#11 /includes/templates/template_default/templates/tpl_index_product_list.php(99): require('/home/xxxxxx/...')
#12 /includes/modules/pages/index/main_template_vars.php(232): require('/home/xxxxxx/...')
#13 /includes/templates/classicBasic2/common/tpl_main_page.php(108): require('/home/xxxxxx/...')
#14 /index.php(94): require('/home/xxxxxx/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/functions/functions_strings.php on line 335.
[01-Aug-2024 22:31:59 UTC] Request URI: /blues-c-20/bmz_cache/1/103_1722jpg.image.92x80.jpg, IP address: 20.112.85.84, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/functions/functions_strings.php(335): preg_replace()
#2 /includes/classes/usu.php(968): zen_clean_html()
#3 /includes/classes/usu.php(628): usu->filter()
#4 /includes/classes/usu.php(385): usu->get_product_name()
#5 /includes/classes/usu.php(223): usu->parse_parameters()
#6 /includes/classes/observers/UsuObserver.php(59): usu->href_link()
#7 /includes/classes/traits/NotifierManager.php(87): UsuObserver->update()
#8 /includes/functions/html_output.php(18): base->notify()
#9 /includes/modules/classicBasic2/product_listing.php(214): zen_href_link()
#10 /includes/templates/template_default/templates/tpl_modules_product_listing.php(10): include('/home/xxxxxx/...')
#11 /includes/templates/template_default/templates/tpl_index_product_list.php(99): require('/home/xxxxxx/...')
#12 /includes/modules/pages/index/main_template_vars.php(232): require('/home/xxxxxx/...')
#13 /includes/templates/classicBasic2/common/tpl_main_page.php(108): require('/home/xxxxxx/...')
#14 /index.php(94): require('/home/xxxxxx/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/functions/functions_strings.php on line 335.
[01-Aug-2024 22:31:59 UTC] Request URI: /blues-c-20/bmz_cache/1/103_1722jpg.image.92x80.jpg, IP address: 20.112.85.84, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/functions/functions_strings.php(335): preg_replace()
#2 /includes/classes/usu.php(968): zen_clean_html()
#3 /includes/classes/usu.php(628): usu->filter()
#4 /includes/classes/usu.php(385): usu->get_product_name()
#5 /includes/classes/usu.php(223): usu->parse_parameters()
#6 /includes/classes/observers/UsuObserver.php(59): usu->href_link()
#7 /includes/classes/traits/NotifierManager.php(87): UsuObserver->update()
#8 /includes/functions/html_output.php(18): base->notify()
#9 /includes/modules/classicBasic2/product_listing.php(214): zen_href_link()
#10 /includes/templates/template_default/templates/tpl_modules_product_listing.php(10): include('/home/xxxxxx/...')
#11 /includes/templates/template_default/templates/tpl_index_product_list.php(99): require('/home/xxxxxx/...')
#12 /includes/modules/pages/index/main_template_vars.php(232): require('/home/xxxxxx/...')
#13 /includes/templates/classicBasic2/common/tpl_main_page.php(108): require('/home/xxxxxx/...')
#14 /index.php(94): require('/home/xxxxxx/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/functions/functions_strings.php on line 335.
Perhaps help is at https://stackoverflow.com/questions/...pe-arraystring
There's the issue: /blues-c-20/bmz_cache/1/103_1722jpg.image.92x80.jpg
... which is why it helps to post the full log information. Where did that link come from? I'm guessing line 214 of the template's product_listing.php.
thanks @lat9 - by the time I came back here, I had found some issues in the product_listing.php. Keeping my fingers crossed that I fixed it!
after turning off ultimate, the number of separate logs inside one error log are reduced to 1 instead. I also have gone into to every folder and made sure there were no leftover bits of anything from previous versions. Thanks to everyone who chimed in. Now to post elsewhere! unless someone can weigh in on the remaining log? (yeah, I know it's not ultimate!)
Code:[01-Aug-2024 22:31:59 UTC] Request URI: /blues-c-20/bmz_cache/1/103_1722jpg.image.92x80.jpg, IP address: 20.112.85.84, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/functions/functions_strings.php(335): preg_replace()
#2 /includes/classes/usu.php(968): zen_clean_html()
#3 /includes/classes/usu.php(628): usu->filter()
#4 /includes/classes/usu.php(385): usu->get_product_name()
#5 /includes/classes/usu.php(223): usu->parse_parameters()
#6 /includes/classes/observers/UsuObserver.php(59): usu->href_link()
#7 /includes/classes/traits/NotifierManager.php(87): UsuObserver->update()
#8 /includes/functions/html_output.php(18): base->notify()
#9 /includes/modules/classicBasic2/product_listing.php(214): zen_href_link()
#10 /includes/templates/template_default/templates/tpl_modules_product_listing.php(10): include('/home/xxxxxx/...')
#11 /includes/templates/template_default/templates/tpl_index_product_list.php(99): require('/home/xxxxxx/...')
#12 /includes/modules/pages/index/main_template_vars.php(232): require('/home/xxxxxx/...')
#13 /includes/templates/classicBasic2/common/tpl_main_page.php(108): require('/home/xxxxxx/...')
#14 /index.php(94): require('/home/xxxxxx/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/functions/functions_strings.php on line 335.
[01-Aug-2024 22:31:59 UTC] Request URI: /blues-c-20/bmz_cache/1/103_1722jpg.image.92x80.jpg, IP address: 20.112.85.84, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/functions/functions_strings.php(335): preg_replace()
#2 /includes/classes/usu.php(968): zen_clean_html()
#3 /includes/classes/usu.php(628): usu->filter()
#4 /includes/classes/usu.php(385): usu->get_product_name()
#5 /includes/classes/usu.php(223): usu->parse_parameters()
#6 /includes/classes/observers/UsuObserver.php(59): usu->href_link()
#7 /includes/classes/traits/NotifierManager.php(87): UsuObserver->update()
#8 /includes/functions/html_output.php(18): base->notify()
#9 /includes/modules/classicBasic2/product_listing.php(214): zen_href_link()
#10 /includes/templates/template_default/templates/tpl_modules_product_listing.php(10): include('/home/xxxxxx/...')
#11 /includes/templates/template_default/templates/tpl_index_product_list.php(99): require('/home/xxxxxx/...')
#12 /includes/modules/pages/index/main_template_vars.php(232): require('/home/xxxxxx/...')
#13 /includes/templates/classicBasic2/common/tpl_main_page.php(108): require('/home/xxxxxx/...')
#14 /index.php(94): require('/home/xxxxxx/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/functions/functions_strings.php on line 335.
[01-Aug-2024 22:31:59 UTC] Request URI: /blues-c-20/bmz_cache/1/103_1722jpg.image.92x80.jpg, IP address: 20.112.85.84, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/functions/functions_strings.php(335): preg_replace()
#2 /includes/classes/usu.php(968): zen_clean_html()
#3 /includes/classes/usu.php(628): usu->filter()
#4 /includes/classes/usu.php(385): usu->get_product_name()
#5 /includes/classes/usu.php(223): usu->parse_parameters()
#6 /includes/classes/observers/UsuObserver.php(59): usu->href_link()
#7 /includes/classes/traits/NotifierManager.php(87): UsuObserver->update()
#8 /includes/functions/html_output.php(18): base->notify()
#9 /includes/modules/classicBasic2/product_listing.php(214): zen_href_link()
#10 /includes/templates/template_default/templates/tpl_modules_product_listing.php(10): include('/home/xxxxxx/...')
#11 /includes/templates/template_default/templates/tpl_index_product_list.php(99): require('/home/xxxxxx/...')
#12 /includes/modules/pages/index/main_template_vars.php(232): require('/home/xxxxxx/...')
#13 /includes/templates/classicBasic2/common/tpl_main_page.php(108): require('/home/xxxxxx/...')
#14 /index.php(94): require('/home/xxxxxx/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/functions/functions_strings.php on line 335.
That url /blues-c-20/bmz_cache/1/103_1722jpg.image.92x80.jpg
Is still funky. I think there is either an error in your image handler implementation or USU. Easy way to find out, jam image handler into the responsive template (or just switch to it? Been a bit, can't remember if template edits are needed) and see if it copes.
and it's one product that's creating this. One category and all products. I can't imagine what the base problem is but at least I now know it's not a coding issue. Thanks again everyone!
and there it is! I'm thinking there's something wrong with the image as there are no other issues and the issue persists when image hander is turned off. If I go look for it in the appropriate bmz folder, it's not there. I cleared the cache but nothing. So I've asked the owner to click thru to each of the 155 products in the catagory to see if we can figure out which is the issue. I don't know of anything else to do. Thanks gothstone!
Random thought, whats the actual name of category 20 and this product. Do they perhaps include -c- or -p- ? Cuz that would confuse usu...
as this only happens in one out of 33 categories, I'm quite sure it has nothing to do with that - and I turned off ultimate.
It ended up being a corrupted product - no corresponding product_description entry. It's an old cart (2007) so no telling when or what happened.
v3.1.1 of USU is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=132
This version corrects the PHP Fatal error logged when $_GET['main_page'] is an array (GitHub issue #57).
Hello, I am currently using zencart v2.0.1 Before adding the ultimate seo plugin, all of my old urls were redirecting to my homepage using this code in the .htaccess file:
# Rewrite all other requests (if the file / directory does not exist)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]
Now that the plugin is installed and working, my old urls are now a white screen with the above code :( How can I get my old urls to redirect to my homepage?
Thanks, Gina!
A couple of pieces of information would help me help you.
First, if you've received a whitescreen there's a myDEBUG*.log file in the site's /logs directory identifying what the issue is.
Second, how about an example of one of the 'old' urls?
i would look at the complete htaccess file.
i think it could be a question of the ordering of the rules there.
I will check the the debug log. Here is one of my old url links from pinterest for an example: https://enchantedcottageshop.com/sho...-vintage-style
Today's debug log: [14-Dec-2024 07:14:36 UTC] Request URI: /shop/index.php?main_page=unsubscribe&action=unsubscribe, IP address: 80.85.245.241, Language id 1
#1 require(/home/enchant1/public_html/shop/includes/modules/pages/unsubscribe/header_php.php) called at [/home/enchant1/public_html/shop/index.php:35]
--> PHP Warning: Undefined array key "addr" in /home/enchant1/public_html/shop/includes/modules/pages/unsubscribe/header_php.php on line 29.
I also noticed that my code to block bots in the .htaccess file is no longer blocking them :( I will rearrange the order of coding to see if that makes a difference. As of now, my codes are after Ultimate SEO's codes in the file. I will put my codes first to see if that makes a difference.
The url redirect code at the beginning causes the Ultimate SEO not to work but it works fine with the bot block coding in the beginning. I will have to wait and see if the bots will be blocked, I sure hope so.
The bots are not being blocked anymore because they accessed my site today. So my old urls were redirecting and bots were being blocked before the ultimate seo plugin. I wish I was smart with coding, I don't understand why the ultimate seo codes in .htaccess are causing my redirecting codes and bot block codes not to work :dontgetit
Code:RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (crawl|AhrefsBot|SemrushBot) [NC]
RewriteRule .* - [F,L]
# 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 ^(.*)-c-([0-9_]+)/(.*)-pi-([0-9]+)(.*)$ index\.php?main_page=popup_image&pID=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pr-([0-9]+)(.*)$ index\.php?main_page=product_reviews&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pri-([0-9]+)(.*)$ index\.php?main_page=product_reviews_info&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-prw-([0-9]+)(.*)$ index\.php?main_page=product_reviews_write&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-aaq-([0-9]+)(.*)$ index\.php?main_page=ask_a_question&pid=$4&cPath=$2&%{QUERY_STRING} [L]
# Original (unchanged) URL formats
RewriteRule ^(.*)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
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 ^(.*)-prw-([0-9]+)(.*)$ index\.php?main_page=product_reviews_write&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-aaq-([0-9]+)(.*)$ index\.php?main_page=ask_a_question&pid=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+)(.*)$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)(.*)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
# Rewrite all other requests (if the file / directory does not exist)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]
So I'm guessing nothing looks wrong in the coding? :lookaroun
Except for the user-agent rule and the one that follows, that's as-shipped USU.
I'm just not sure how this rule is going to affect the overall rewrites:
RewriteRule .* - [F,L]
Just an FYI, I put the bot blocking code at the top of the .htaccess in my shop folder and also added it to the .htaccess in the public_html folder. They are now being blocked.
Is it possible to customize the URLs generated by the Ultimate SEO module? For example, instead of default URLs like 'page 2', 'page 3', and 'page 4', I’d like to assign specific, descriptive names that reflect the content of each page.
This could potentially be achieved by introducing a custom mapping file, such as:
The module could reference this file during URL generation and, if a custom name is defined, use it instead of the default. This approach would retain existing functionality for undefined pages while offering greater flexibility for SEO and user-friendly URLs.PHP Code:
return [
'page_2' => 'faq',
'page_3' => 'wholesale',
'page_4' => 'services',
];
I've created a GitHub issue (https://github.com/lat9/usu/issues/60) to record your request.
v3.1.2 of USU is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=132
This version contains the correction for GitHub issue #59 (Undefined variable $value_pair)
Is there a way to quickly get the URI of a given category?
PHP 8.4, ZC 2.1.0, Template: ZCA Bootstrap 3.7.5, IH 5.3.5, Ultimate SEO 3.1.2
Is there a way to prevent Ultimate SEO from rewriting the names of images?
Oh christ. That explains why this name breaks:
/bmz_cache/c/cb01-p-109png.image.29x40.png
That's the name generated from Image Handler. Is there a way to exclude the bmz_cache directory? Or is it a hard no? (I've already renamed the source file and directory but still was just curious.)
Would this happen to work?
Code:# Exclude bmz_cache for ImageHandler
RewriteCond %{REQUEST_URI} ^/bmz_cache/ [NC]
RewriteRule .* - [L]
Running the full .htaccess through an .htaccess tester (https://htaccess.madewithlove.com)
I get the following:
The URL:
https://www.justuptowngames.com/universus-cowboy-bebop-c-2_24/twinkle-murdock-p-847.html
Translates to:
https://www.justuptowngames.com/index.php?main_page=product_info&products_id=847&cPath=2_24&
Which is the normal behavior.
Translating:
https://www.justuptowngames.com/bmz_cache/c/cb01-p-109png.image.88x120.png
Before the change above yields:
https://www.justuptowngames.com/index\.php?main_page=product_info&products_id=109&
(which explains why the <img> tag breaks and clicking on the source in my browser inspect tab takes me to another product page)
But adding the lines above to the area just under the # Start Ultimate (SEO) URL's section (but before the RewriteRules of the same) makes it leave it alone.
Sound like a plan. Would you be willing to create a PR on USU's GitHub? https://github.com/lat9/usu
And done. (Submitted as a PR)
In short, if the REQUEST_URI that starts with /bmz_cache/ (aka the main directory of ImageHandler's cache) is found, regardless of casing (the [NC]), do nothing with it... and STOP searching for more rule matches ([L]).Code:# Exclude /bmz_cache for ImageHandler
RewriteCond %{REQUEST_URI} ^/bmz_cache/ [NC]
RewriteRule .* - [L]
In short, if the REQUEST_URI that starts with /images/ is found, ZenCart's main primary image directory, regardless of casing (the [NC]), do nothing with it... and STOP searching for more rule matches ([L]) .Code:# Exclude /images directory in general
RewriteCond %{REQUEST_URI} ^/images/ [NC]
RewriteRule .* - [L]
It gets messy after this point if people put their images in weird, non-standard image directories.
I was just about to send you a PR to fix the $value_pair bug and saw you had already fixed it! LOL. Thanks for doing such a great job supporting this plugin.
I am keeping this addon in mind. I am wondering if the (p-id) can be removed. Like for an example.
From http://yoursite.com/disciples-sacred...nked-p-24.html
to http://yoursite.com/disciples-sacred-lands-linked.html
http://yoursite.com/software-strategy-c-2_20.html to http://yoursite.com/software-strategy.html for the categories.