Oh, i didn't get any errors messages when I moved the install scripts over and then clicked on the Admin link other than the
This page isn’t working
xxx is currently unable to handle this request.
HTTP ERROR 500
Printable View
Oh, i didn't get any errors messages when I moved the install scripts over and then clicked on the Admin link other than the
This page isn’t working
xxx is currently unable to handle this request.
HTTP ERROR 500
Update, I copied the code in from Beta2, all at once without stopping (the admin wasn't coming up anyway).... and it came back to life... but without the USU loaded. I then moved the beta2 install over on my production copy database and it blanked again.
P.S. I am also Kenaniah
I do not know if this means anything but I noticed my v1.5.4 production database with Ultimate SEO 2.215 has a usu_cache table and so does the barebones Beta2 and Beta3 .... but my production copy which has been converted does not have that table.... ???
Okay, correction... I had deleted the zip for the beta2 and thought I was redownloading it but just figured out that 2.217 is what you get when you now download the beta2 link..... so version 2.217 is also not working with my production database but version 2.216 is..... ????
Shazam, Shazam, Shazam!!!! As you can know I got version 2.216 to work on the copy of my production database.... well, I thought why not try to load 2.217 and see what happens.... guess what! It updated.... then beta3.... it updated. So.... now I can see my Admin again and everything is working ....except the larger image picture is being squished.
In all those updates, there would be debug-logs associated with those admin white-screens in the site's /logs directory. I'd be interested to see some of those as I don't have any working installations going back to 2.215/2.216.
If you post them, be sure to xxx-out the name of the admin directory and paste the contents of the log file(s) within 'CODE' tags (the big # in the post-writing menu-bar) so that they're more readable.
I have been working with Zen Cart for many many years now and very noticed the docs folder.... never knew someone could look at it.... I tried to move your docs folder into mine but it stopped working after that.... could write instructions to have the USU docs merge with the regular zen cart documents? Thank you!
You could simply create a sub-directory under /docs (e.g. /docs/usu) and copy all the files from USU's /readme directory to that new directory.
If that's on your live store, make sure that you set permissions so that it's not directly accessible by everyone!
VERSION (NEW CODE - CONVERTED DATABASE)
----------
v156a
PLUGINS
----------
Encrypted Master Password 2.3.1
Numinix Google Analytics
USU 2.216
USU 2.217
USU 3.0.0-beta3
PHP Version: 5.6.40
Database Engine: MySQL 5.7.25
This appears to be occurring with all my products. I pick a product. Edit it.... Change the quantity... then PREVIEW.... the result is that it gives the product name but doesn't give anymore of the preview.... i am unable to save the changes (No buttons). I uninstalled USU to see if this was what was causing the problems and it works without USU.
myDEBUG-adm-20190222-064127-000000.log[FONT=Verdana, sans-serif]
[22-Feb-2019 06:41:28 UTC] PHP Fatal error: Call to a member function format() on null in /home/xxx/public_html/xxx/admin/includes/modules/product/preview_info.php on line 65
[22-Feb-2019 06:41:28 UTC] Request URI: /admin/product.php?cPath=10434&pID=38536&action=new_product_preview, IP address: xx.xx.xx.xxx
--> PHP Fatal error: Call to a member function format() on null in /home/xxx/public_html/xxx/admin/includes/modules/product/preview_info.php on line 65.
It sounds like you haven't restored /admin/product.php to its original Zen Cart 1.5.6a version.
I copied the barebones admin back on top and it worked.... so appears issue is with USU file change???
I am going to start again with a fresh clean directory and only load USU and repost what I find. Thank you!
Will this version be fixed for updating from older versions?
Thank you!
v3.0.0 identifies in its readme how to perform that update, weeding out the code fragments that were previously introduced by its now-defunct auto-installer. I'll add a couple of checks to the v3.0.0 update processing to look for (and message to the updating admin) any remnants of that previous processing that still remain.
Hello, Please remember that I started with a fresh install script.... this is what I do each time I upgrade my website.
Just an FYI
I created a new clean fresh install..... connected it with the pre-converted production database.... and moved the code over for usu-3.0.0
It showed that it updated from 2.1.16 to 2.1.17 and everything looked successful.... but it is doing the same thing.... it is not allowing me to update a product.... it just shows the name of the product in the preview and does not load the rest of the page. So, something is not working right with either the code or with older converted databases with the USU. This is the only change I have made to the standard install.
[22-Feb-2019 21:17:53 UTC] PHP Fatal error: Call to a member function format() on null in /home/com/public_html/site/admin/includes/modules/product/preview_info.php on line 65
[22-Feb-2019 21:17:53 UTC] Request URI: /admin/product.php?cPath=10214&pID=1075&action=new_product_preview, IP address: xx.xx.xx.xx
--> PHP Fatal error: Call to a member function format() on null in /home/com/public_html/site/admin/includes/modules/product/preview_info.php on line 65.
Hi Cindy, many thanks for that explanation and for the time and effort you have put into this issue. I am often slow on the uptake so just checking that I have got this right :smile:
I appreciate it being a best guess given your inheritance of the plugin! .... and I do not see it as a plugin issue anyway.Quote:
My best guess is that the canonical link handling in USU was introduced to support Zen Cart versions prior to 1.3.9 (where the built-in canonical-link handling was introduced) and was never removed.
Here is how I see it. USU worked like a charm in v1.5.1 with the /includes/init_includes/overrides/init_canonical.php included the file package and SitemapXML files were generated correctly using USU generated url's.
USU v2 does work in v1.5.5f in that it does create the user friendly URL's as it is designed to - the problem is that those URL's are not generated in the SitemapXML files - given that USU and SitemapXML versions were the same (as used in v1.5.1, and still valid) at the time of upgrade to v1.5.5f, it appears something is not correlating between ZC core files in v1.5.5f and USU and SitemapXML - given that USU is generating the files correctly then it appears something is not telling SitemapXML to produce USU generated URLs in its files. The only change in the process is changes to ZC core files in v1.5.5f - so what changed in the core of v1.5.5f to create this 'imbalance' ? If that change could be isolated it may (should) solve the issue :smile: - I really do not want to upgrade to v1.5.6 any time soon (still recovering from 155f upgrades).
I have converted all my v1.5.5f sites to CEON URI Mapping so to test your theory of removing /includes/init_includes/overrides/init_canonical.php from USU v2 I will need to look at how I can do that without creating chaos :smile:
I haven't checked it out but maybe I can have both plugins installed without creating conflict and switch between them - in your opinion is that likely to be possible?
cheers and thanks for your continuing help,
Mike
Hello lat9,
I see the issue. I had redownloaded the "beta3" from get the latest and greatest and it is now giving the 2.1.7 code instead of the beta code. Fortunately, I had deleted the actually beta3 code and was able to retrieve it and I will do some testing today and let you know how it goes.
Shrimp-Gumbo-mmmhhh
FWIW, I just installed Sitemap XML 3.9.5 and USU 3.0.0-beta3 on an Edit Orders/zc155f test site (w/ demo products) and I'm happy to report that the USU-generated links are used for the sitemap-generated files.
Here's, for example, the contents of the manufacturers' one:
Code:<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/zc155feo/includes/templates/template_default/css/gss.xsl"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- generator="Zen-Cart SitemapXML" 3.9.5 -->
<!-- sitemapmanufacturers.xml created at 2019-02-23 08:38:45 -->
<url>
<loc>http://localhost/zc155feo/matrox-m-1.html</loc>
<lastmod>2003-12-23</lastmod>
<changefreq>weekly</changefreq>
<priority>1.00</priority>
</url>
<url>
<loc>http://localhost/zc155feo/microsoft-m-2.html</loc>
<lastmod>2003-12-23</lastmod>
<changefreq>weekly</changefreq>
<priority>0.89</priority>
</url>
<url>
<loc>http://localhost/zc155feo/warner-m-3.html</loc>
<lastmod>2003-12-23</lastmod>
<changefreq>weekly</changefreq>
<priority>0.78</priority>
</url>
<url>
<loc>http://localhost/zc155feo/fox-m-4.html</loc>
<lastmod>2003-12-23</lastmod>
<changefreq>weekly</changefreq>
<priority>0.67</priority>
</url>
<url>
<loc>http://localhost/zc155feo/logitech-m-5.html</loc>
<lastmod>2003-12-23</lastmod>
<changefreq>weekly</changefreq>
<priority>0.56</priority>
</url>
<url>
<loc>http://localhost/zc155feo/canon-m-6.html</loc>
<lastmod>2003-12-23</lastmod>
<changefreq>weekly</changefreq>
<priority>0.44</priority>
</url>
<url>
<loc>http://localhost/zc155feo/sierra-m-7.html</loc>
<lastmod>2003-12-23</lastmod>
<changefreq>weekly</changefreq>
<priority>0.33</priority>
</url>
<url>
<loc>http://localhost/zc155feo/gt-interactive-m-8.html</loc>
<lastmod>2003-12-23</lastmod>
<changefreq>weekly</changefreq>
<priority>0.22</priority>
</url>
<url>
<loc>http://localhost/zc155feo/hewlett-packard-m-9.html</loc>
<lastmod>2003-12-23</lastmod>
<changefreq>weekly</changefreq>
<priority>0.11</priority>
</url>
</urlset>
1) I started with completely fresh install script
2) Loaded the original usu-3.0.0-beta2 (this version has the known issue of not working correctly when "Enable Automatic Redirects" is set to TRUE) Install successful
3) Went to Admin -> Catalog/Products
4) Selected a Category
5) Was given the message "
Well, I had a ton of information on there that got lost.... basically there is a bug in /includes/classes/usu.php
change:
$check = $GLOBALS['db']->Execute(
"SELECT pt.products_type
to:
$check = $GLOBALS['db']->Execute(
"SELECT p.products_type
And you will not get the error message I tried to post.
#10 zen_catalog_href_link() called at [/home/com/public_html/site/admin/category_product_listing.php:861]
--> PHP Fatal error: 1054:Unknown column 'pt.products_type' in 'field list' :: SELECT pt.products_type
FROM product_types pt
INNER JOIN products p
ON p.products_id = pt.type_id
WHERE pt.type_id = 35259
LIMIT 1 ==> (as called by) /home/com/public_html/site/includes/classes/usu.php on line 457 <== in /home/com/public_html/site/includes/classes/db/mysql/query_factory.php on line 171.
Was there a quick and simple fix for the Enable Automatic Redirects that I could make on this version of my code?
Okay, got the usu-3.0.0-beta3 and moved over and everything works fine.... you had already fixed that issue.
Thank you!
Actually, that function should be changed as follows (GitHub issue: https://github.com/lat9/usu/issues/15):
The change needed for the automatic redirects is already "baked into" USU v3.0.0-beta3.Code:protected function getInfoPage($products_id)
{
// -----
// Quick return if the zen_get_info_page function exists, noting that when
// run in the zc156 and earlier admin that it isn't!
//
if (function_exists('zen_get_info_page')) {
return zen_get_info_page($products_id);
}
// -----
// If the function doesn't exist, emulate its output.
//
$check = $GLOBALS['db']->Execute(
"SELECT pt.type_handler
FROM " . TABLE_PRODUCTS . " p
INNER JOIN " . TABLE_PRODUCT_TYPES . " pt
ON pt.type_id = p.products_type
WHERE p.products_id = " . (int)$products_id . "
LIMIT 1"
);
return ($check->EOF) ? 'product_info' : ($check->fields['type_handler'] . '_info');
}
v3.0.0-beta4 is now available for testing: https://github.com/lat9/usu/releases/tag/v3.0.0-beta4
I know I might be the only one upgrading from the beta3 but this occurred when installing the latest and greatest beta4
The installed version of 'Ultimate URLs' is newer than the installer. This may indicate a problem occurred when the uploading files for the Ultimate URLs plugin!
Please upload the currently installed version before continuing. Attempting to downgrade without first removing the newer version is not recommended and may result in damage to the store.
Found previous version installed. Upgrading (or re-installing) Ultimate URLs (old 3.0.0-beta2 => new 2.217).
Ultimate URLs installation / upgrade completed!
perhaps the version hasn't been updated on the beta4 sql statement?
I moved the new beta4 on top of my beta3 install and am getting the same error as before ....
When I try to edit a product it is not completing the page on preview....
[23-Feb-2019 15:52:49 UTC] PHP Fatal error: Call to a member function format() on null in /home/public_html/site/admin/includes/modules/product/preview_info.php on line 65
[23-Feb-2019 15:52:49 UTC] Request URI: /admin/product.php?cPath=14&pID=12553&action=new_product_preview, IP address:
--> PHP Fatal error: Call to a member function format() on null in /home/com/public_html/site/admin/includes/modules/product/preview_info.php on line 65.
This was working just a few minutes ago with what I had upgraded from Beta3... Before Beta3 I started with a fresh script and did not install any 2.17 script or code. There should not be any 2.17 code in my stuff. :( :( :(
I installed the uninstall and ran it...
It doesn't work at this point...
I moved back the beta4 and installed....
Ultimate URLs installation / upgrade completed!
After the installation my admin still shows the version number to be unchanged....
Ultimate URLs Version
Indicates the currently installed version of Ultimate URLs.
2.217
Where is the code at that sets the version level in the module???
This is still not working correctly.... product update preview is not completing the page....
PHP Fatal error: Call to a member function format() on null in /home/com/public_html/site/admin/includes/modules/product/preview_info.php on line 65.
Code:<?php/**
* @package admin
* @copyright Copyright 2003-2019 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: DrByte 2019 Jan 04 Modified in v1.5.6a $
*/
require('includes/application_top.php');
$action = (isset($_GET['action']) ? $_GET['action'] : '');
// If the action will affect the cache entries
if (preg_match("/(insert|update|setflag)/i", $action)) {
usu_reset_cache_data('true');
}
if (zen_not_null($action)) {
switch ($action) {
case 'insert_product_meta_tags':
case 'update_product_meta_tags':
if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product_meta_tags.php')) {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product_meta_tags.php');
} else {
require(DIR_WS_MODULES . 'update_product_meta_tags.php');
}
break;
case 'insert_product':
case 'update_product':
if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product.php')) {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product.php');
} else {
require(DIR_WS_MODULES . 'update_product.php');
}
break;
/*
case 'new_product_preview_meta_tags':
if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview_meta_tags.php')) {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview_meta_tags.php');
} else {
require(DIR_WS_MODULES . 'new_product_preview_meta_tags.php');
}
break;
*/
case 'new_product_preview':
if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview.php')) {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview.php');
} else {
require(DIR_WS_MODULES . 'new_product_preview.php');
}
break;
}
}
// check if the catalog image directory exists
if (is_dir(DIR_FS_CATALOG_IMAGES)) {
if (!is_writeable(DIR_FS_CATALOG_IMAGES)) {
$messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
}
} else {
$messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
?>
<!doctype html>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta charset="<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" href="includes/stylesheet.css">
<link rel="stylesheet" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
<script src="includes/menu.js"></script>
<script src="includes/general.js"></script>
<script>
function init() {
cssjsmenu('navbar');
if (document.getElementById) {
var kill = document.getElementById('hoverJS');
kill.disabled = true;
}
}
</script>
<?php
if ($action != 'new_product_meta_tags' && $editor_handler != '') {
include ($editor_handler);
}
?>
</head>
<body onload="init();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<!-- body_text //-->
<?php
// echo DIR_WS_MODULES . $zc_products->get_handler($product_type);
if ($action == 'new_product_meta_tags') {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/collect_info_metatags.php');
} elseif ($action == 'new_product') {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/collect_info.php');
} elseif ($action == 'new_product_preview_meta_tags') {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/preview_info_meta_tags.php');
} elseif ($action == 'new_product_preview') {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/preview_info.php');
}
?>
<!-- body_text_eof //-->
<!-- body_eof //-->
<!-- script for datepicker -->
<script>
$(function(){
$('input[name="products_date_available"]').datepicker();
})
</script>
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
That's because, as I've pointed out multiple times before, you've still got those v2.217 php-file remnants lurking around in your site's file-system. That's evidenced by the changes made to the top of your /admin/product.php, where the v2.217 installer is making those unwanted changes to that file.
Truthfully, there could have been a possibility of other code when I last tested. I am sorry about that.
However, I have unzipped another fresh v156a and only moving the config.sys for admin and / into it.... there is no other code I am putting with this. I move over the Beta4 as instructed.... it installs.... my Ultimate shows version 2.17 ..... and it doesn't work.... however, when I replace the admin/product.php file from the v156s on top of the installation then it does work.
I would like to help you debug this problem if you would like to... I need to know what does the install read from the database when installing.... is it possible it is reading from the directory below the install? That unfortunately is where I have installed my production site .... could it be reading the files from there and pulling over?
I've just submitted USU v3.0.0 to the Zen Cart plugins for review; I'll update this thread when it's available for download.
This version of USU supports Zen Cart 1.5.5 and later, providing updates for the following GitHub issues:
#2: Simplification of the plugin's logging interface.
#7: Canonical-link not being written.
#8: Correct usage of zen_get_info_page when used during admin processing (zc156+ integration).
#10: USU installer doesn't update zc156+ core files correctly.
#11: Restructure plugin to require no core-file overwrites
Note that the "no-core overwrites" requires that the changes required by previous versions of USU must be removed prior to installing v3.0.0. I promise, it'll be much easier next time!
See the following link for more information: https://github.com/lat9/usu/blob/mas...ade_from_v2.md
lat9, I just saw you have a new version..... where can I download the zip that extracts like this? 1) load files 2) .htaccess 3) install 4)uninstall wording
I have redone the testing work of the beta4 on a new account that has NEVER had a ZEN CART website on it.
1) I copy the 1.5.4 database and install it on the new server (I dare not delete the USU from my production environment)
2) I put the fresh untouched v156a code over
3) I run the install and convert the database to 1.5.6a
4) I move the new beta4 code over
5) I move the new beta4 .htaccess over
6) I run the install
Found previous version installed. Upgrading (or re-installing) Ultimate URLs (old 2.215 => new 2.217).
Ultimate URLs installation / upgrade completed!
Yes, the code v1.5.6a or the USU beta4 changes the admin/products.php file during installation I suppose (I have only introduced fresh code to this server.... no old code.)
It also does the same thing.... it will not load the preview screen of product change.Code:<?php/**
* @package admin
* @copyright Copyright 2003-2019 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: DrByte 2019 Jan 04 Modified in v1.5.6a $
*/
require('includes/application_top.php');
$action = (isset($_GET['action']) ? $_GET['action'] : '');
// If the action will affect the cache entries
if (preg_match("/(insert|update|setflag)/i", $action)) {
usu_reset_cache_data('true');
}
if (zen_not_null($action)) {
switch ($action) {
case 'insert_product_meta_tags':
case 'update_product_meta_tags':
if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product_meta_tags.php')) {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product_meta_tags.php');
} else {
require(DIR_WS_MODULES . 'update_product_meta_tags.php');
}
break;
case 'insert_product':
case 'update_product':
if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product.php')) {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product.php');
} else {
require(DIR_WS_MODULES . 'update_product.php');
}
break;
/*
case 'new_product_preview_meta_tags':
if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview_meta_tags.php')) {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview_meta_tags.php');
} else {
require(DIR_WS_MODULES . 'new_product_preview_meta_tags.php');
}
break;
*/
case 'new_product_preview':
if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview.php')) {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview.php');
} else {
require(DIR_WS_MODULES . 'new_product_preview.php');
}
break;
}
}
// check if the catalog image directory exists
if (is_dir(DIR_FS_CATALOG_IMAGES)) {
if (!is_writeable(DIR_FS_CATALOG_IMAGES)) {
$messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
}
} else {
$messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
?>
<!doctype html>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta charset="<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" href="includes/stylesheet.css">
<link rel="stylesheet" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
<script src="includes/menu.js"></script>
<script src="includes/general.js"></script>
<script>
function init() {
cssjsmenu('navbar');
if (document.getElementById) {
var kill = document.getElementById('hoverJS');
kill.disabled = true;
}
}
</script>
<?php
if ($action != 'new_product_meta_tags' && $editor_handler != '') {
include ($editor_handler);
}
?>
</head>
<body onload="init();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<!-- body_text //-->
<?php
// echo DIR_WS_MODULES . $zc_products->get_handler($product_type);
if ($action == 'new_product_meta_tags') {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/collect_info_metatags.php');
} elseif ($action == 'new_product') {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/collect_info.php');
} elseif ($action == 'new_product_preview_meta_tags') {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/preview_info_meta_tags.php');
} elseif ($action == 'new_product_preview') {
require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/preview_info.php');
}
?>
<!-- body_text_eof //-->
<!-- body_eof //-->
<!-- script for datepicker -->
<script>
$(function(){
$('input[name="products_date_available"]').datepicker();
})
</script>
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
1) So, just for grins I run the uninstall.
Ultimate URLs removal completed! Do not forget to undo any modifications made by Ultimate URLs to core files
2) load the code and install again
Ultimate URLs installation / upgrade completed!
This is still not working on the product update preview.....
The version on admin shows 2.217
3) I move the admin/products.php from the new fresh code..... and it works.... but is everything okay? I don't know.
:(
THE NEW CODE WORKS!!!!! Thank you!
This is where you find the new code .... in the gzip https://github.com/lat9/usu/releases/tag/v3.0.0
v3.0.0 is now available for download from the Zen Cart Plugins (https://www.zen-cart.com/downloads.php?do=file&id=132). Thanks to @swguy for correcting my coding error!
I was able to installed Version 3.0 in my test ZC 1.5.6 test site.
However, the configuration group was not listed!
https://i.imgur.com/AVyC6AZ.png
I don't know how configuration.php works. Only certain config group shown and not all of them.
(Previous database indeed had previous version of USU. I upgraded my ZC on test site and upgraded database. Then upgrade the USU to 3.0 and this occurred.)
Just had something show up I've never seen before. I have a customer who's got more/complicated sub categories than I may have ever seen before. Thus ending up with a link of https://www.corbymotorsport.com/kw-c...36_10437_10438 which gives a 406 code. Do you suppose it's just too much for the mod / htaccess to handle? The cats go like this: Home » BROWSE BY CAR » AUDI TUNING » AUDI RS4 » AUDI RS4 (B7) » SUSP (aud rs4 b7) » COILS (aud rs4 b7) » kw coils (aud rs3 b7)
This the first time I've ever seen this and his website hasn't been changed in a long time (my server so I'm sure of any possible version issues). He's just hit this and he has been active. He also has a number of other zen cart sites with no issues but this is the larger one of them all.
Delia, my best guess is that that's based on a $_GET size limit per "key" imposed by the Zen Cart base /includes/application_top.php's processing for 'contaminated' keys
The following section, from the zc156a version of that file, imposes a 43-character limit on each of the "paramsToCheck":
USU's .htaccess file sets $_GET['cPath'] to the characters following that trailing -c- ... which comprise 44 characters. Why that limit is 43 is anyone's guess.Code:$paramsToCheck = array('main_page', 'cPath', 'products_id', 'language', 'currency', 'action', 'manufacturers_id', 'pID', 'pid', 'reviews_id', 'filter_id', 'zenid', 'sort', 'number_of_uploads', 'notify', 'page_holder', 'chapter', 'alpha_filter_id', 'typefilter', 'disp_order', 'id', 'key', 'music_genre_id', 'record_company_id', 'set_session_login', 'faq_item', 'edit', 'delete', 'search_in_description', 'dfrom', 'pfrom', 'dto', 'pto', 'inc_subcat', 'payment_error', 'order', 'gv_no', 'pos', 'addr', 'error', 'count', 'error_message', 'info_message', 'cID', 'page', 'credit_class_error_code');
if (!$contaminated) {
foreach($paramsToCheck as $key) {
if (isset($_GET[$key]) && !is_array($_GET[$key])) {
if (substr($_GET[$key], 0, 4) == 'http' || strstr($_GET[$key], '//')) {
$contaminated = true;
break;
}
$len = (in_array($key, array('zenid', 'error_message', 'payment_error'))) ? 255 : 43;
if (isset($_GET[$key]) && strlen($_GET[$key]) > $len) {
$contaminated = true;
break;
}
}
}
}
It does work with uninstalling then reinstalling!
https://i.imgur.com/x2YxfYn.png
Why would that occurred though? Old database conflict data?
-PanZC2020
Well, configuration showed up... but now...
https://i.imgur.com/aBjldP8.png
Most configurations showed up twice (except the first two configurations) x.x
Not positive if another uninstall will do it...
-PanZC2020
If you're familiar with the use of phpMyAdmin, note the &gID=xx value shown in your browser's address-bar when you're viewing the Ultimate URLs configuration settings.
- Open your site's phpMyAdmin and
- Click on the 'configuration' table link in the left sidebar.
- Click the 'Search' tab in the top menu.
- Enter the value for xx in the configuration_group_id 'Value' column and press 'Go'.
- If more than one page of output is generated, tick the 'Show All' checkbox at the top of the listing.
- Take a screenshot of the search output and update this thread with the output.
P.S. I appreciate your help (and patience) with the issues that you're having.
It is quite messy indeed...
https://i.imgur.com/8CthTVD.png
Surely there are settings attached TWICE!
(Updated Image for "Show All" configurations.)
-PanZC2020
Thanks for that! I'll recheck the updated USU installation; I thought that it removed those SEO_ flavored configuration keys.
Just wanted to comment that I was able to solve an issue with the rewritten links leading to a 404 page not found by following this guide here: https://www.digitalocean.com/communi...n-ubuntu-16-04
Ubuntu 16.04 php5.6 server environment, non shared. Hopefully this helps anyone else dealing with this issue.
Help! I've installed the plugin without any issue but how do I get the search engine friendly url's. I know, a silly question. I want to update all my links from the zen cart generated to the new ones but I don't know how :(
Ugh! So, I just realized that is "rewrites" the urls itself but when I click on the links the pages aren't there. I've uninstalled the plugin for right now until I get help with this
As @jeking indicated, USU's initial installation sets the plugin's Enabled value to false; you need to update the USU configuration to enable the generation of the "friendly" URLs.
You also need to ensure that the .htaccess distributed with the plugin has been copied/merged for your store, otherwise, those "friendly" URLs will result in a 404 (page not found).
Hi
I've noiticed a small issue with version 3.0 that I don't remember having with older versions.
As far as the coding goes, everything is sweet. Our site is generating new static url's and redirecting from google generic listings.
The issue we have is a possible conflict with our Google Product Search Feeder. The products links in the feed are still shown as old Zen-Cart dynamic url's. Not a problem as the 301 redirect is set to on but there is a lag while the page is loading from a 301. We have disabled the mod at present.
Our history...
we used the older version of USU back in the days of version zen-cart 1.39. This was uninstalled and replaced with Ceon uri mapping. We took the decision to remove uri mappping due to the many core files that need editing during a zen-cart update and the fact that we had the paid version. We have now installed usu v3. To note, I removed all traces of the previous settings from our database before installing and we are cuttently using Zen-cart 1.55f.
Since you said that you'd previously used the Ceon URI Mappings, make sure that you've removed its /includes/init_includes/overrides files. The current version of USU keys off the use of zen_href_link function for its link-generation functions.
What version of the Google Product Feed are you using?
Hi Lat9,
Thanks for the clues...
We use the paid google feeder version 3.15.0. I know this is old but it's the only one I have that works. In the last few hours, I have been trying to install the latest version 5.0 but one of the files from the folder auto_loaders was making the admin crash. As we need to create a feed later today, I needed something that worked so I've reluctantly reverted back to 3.15.0.
The reason for choosing the paid version was because we have over 6000 products and free plugin version struggled to create the feed.
I've checked the /includes/init_includes/overrides folder and found only an index.html file. It looks like I was quite thorough when I removed the ceon version.
I thought about giving the free google feeder another try in the next few days.
First, to enable the plug in (which I'm pretty sure I had done) that's in the store admin area correct?
And I hadn't changed my .htacess file as when I read through the directions for some reason I didn't think it was need. I will try that again and let you know if it works! Thanks for the help so far and I'll post after I make the changes!
I've just submitted v3.0.1 of USU to the Zen Cart plugin moderators for review and will post back here once it's available for download (https://www.zen-cart.com/downloads.php?do=file&id=132).
This release contains changes associated with the following GitHub issues:
#18: PHP error on upgrade.
#19: Upgrade from previous version fails.
#20: Simplify handling of configuration settings.
#21: Update install procedure to allow removal of only configuration settings.
I'll download to test it on my site
Hello Cindy - I installed CEON URI Mapping as a matter of 'have to' when USU had the canonical problem. CEON is too complicated for me so I want to revert back to the latest version of USU.
Question: will USU seamlessly re-write the CEON generated urls? .... as well as those that are still using the standard ZC generic index.php?xyzacb format? ... i.e. will all currently indexed urls remain indexed without having to be found again by Google?
Are there any specific things I need to do and in any particular order to ensure the changeover works .... seamlessly :)
cheers,
Mike
p.s. I am still trying to recover my previous ranking prior to the USU issue
Mike, USU won't be able to rewrite those customized CEON-generated links since they can be fairly free-form. The only thing that comes to mind is to add rewrites to the .htaccess for each of the CEON-customized links prior to the bit that's required by USU. The developers in the CEON forum might be able to shed additional light on a different solution.
I am using zencart1.55F version
I installed it
Ultimate SEO URLs - Version: 2.216
I turned on the pseudo-static feature, and the front end of the website shows dynamic links.
The environment I used when installing zencart locally is php+Nginx,
But the environment I use on my server is PHP+Apache.
After I moved the program to the server, the pseudo-static function still did not take effect.
I opened the error debugging, the website front desk did not prompt how to error.
very urgent
Attachment 18568
The current version of USU is v3.0.1 (with a v3.0.2 pending). Versions 3.0.0 and later have no core-file changes (the plugin just "drops into" your store's file-system).
I've just submitted v3.0.2 of USU to the plugin moderators for review and will post back here once it's available for download.
This release contains changes associated with the following GitHub issues:
#22: Correct PHP warnings and notices.
#23: Correct over-sanitization of the 'PCRE Filter Rules'.
#24: 'Reset USU Cache' not honored (or reset in the configuration).
ideally your development environment should closely mirror your production environment.
serving up pages with nginx on one, and apache on the other is nowhere close to that ideal environment and one where i see numerous potential problems down the line. such as the one you are experiencing here.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=132
I have a question which hopefully can be answered.
We love the Ultimate URL module and have been using it for years. However, the default Product Page format seems to be something like this:
www.domainname.com/name-of-page-p-1234.html
However, we would like to only display the product ID in this simplified format:
www.domainname.com/1234
Can someone explain what line(s) I would have to add or modify in the .htaccess file to do this? Or would that break the core functionality of the Ultimate URL module?
@Jeff_Mash, how do you envision the URL when a view of a products' listing is requested? Having only the products_id, as identified above, to specify the display of a product's details leaves nothing to distinguish a products_id from a categories_id.
There would be a fair amount of change in USU, most if not all within /includes/classes/usu.php, to accomplish what you desire. Look at how the reg_anchors variable (defined in the constructor) is used. That's what ties the supplied URL to a determinable page within the Zen Cart structure.
That's a good point. I didn't consider what could distinguish the category from the product. I was only thinking that perhaps it was the .htaccess file which would know what the original URL was (with category or product id) and then spit out the formatted URL for better SEO rankings.
We notice a lot of our competitors have very short URLS, which only reference a product id number (no file name, no extension) after the domain name. So I was thinking it might be a simple change in the htaccess to display the URL in that kind of format. We certainly don't want to break anything though by messing with things if it involves changing the USU class.
Hi
We use Ultimate URLS on our website https://sitstandforbusiness.com How can I force https:// URLs? can I do it via Ultimate URLs.
I have ssl as true in both configure files but it keesp reverting back to http://
Please help.
Depending on your version of zen cart - the config file may https where it is not obvious - so what version are you on?
Debbie, what version of Zen Cart and what version of USU are you using? As @delia indicated, if you're trying for "SSL all the time", then you'll not only need to set ENABLE_SSL to 'true', but also ensure that both HTTP_SERVER and HTTPS_SERVER (in the configure.php files) are both prefixed with 'https://'.
Running ZC 1.5.5d, php 5.6 due to old scripts that need to keep running. My site is www.tattingcorner.com but it is not currently running this plugin due to the issue described in the next paragraph.
Installed latest version of this plugin (3.0.2) and once turned on, the URL's looked great. Until a customer entered a category and used the filter option to screen the results they wanted to see. It filters fine, but once you add a product to the cart, it does not bring you back to the filtered page - it just displays the category description. I like the plugin, but unless there's a fix to this I won't be going forward with it. Anyone have any thoughts? It seems to be a feature, but it sure doesn't work as a feature.
Thanks,
Lisa
Ah. My webadmin tells me that my filter is custom/homegrown, as it uses a non-ZenCart field in the products table. He says the issue seems to be the handling (i.e., re-processing) of URL variable values, particularly values with spaces. He sees one potential workaround as changing my code to eliminate the spaces. However, I prefer the spaces in the filter values. For example, I have one brand of thread that has multiple sizes. So my filter values for that category are Lizbeth 3, Lizbeth 10, Lizbeth 20, Lizbeth 40, Lizbeth 80, Lizbeth Twirlz 10, and Lizbeth Twirlz 20. This makes it very easy for my customers to select the thread size they want.
Any thoughts on how to get the plugin to work without changing my code to remove those spaces?
Lisa
Clarification: he explained to me later that he would have to rewrite the code to change the filter options so that they had no spaces (like Lizbeth+3) then have them transform back to having spaces after the URL action took place.
This would be a good deal of time and energy. Is there a way to deal with the situation in the plugin itself?
Lisa, ask your webadmin to make sure that the 'tagSelection' form's 'action' link is created using the zen_href_link function rather than hard-coding. If that function's not used, USU won't be involved in that link-generation.
He did look at this and it wasn't the culprit. He tried a fix, but on the reload of the page after adding items to the shopping cart, the variable doesn't survive the reload and actually reloads the entire product category again (so the filter would have to be reapplied). I just don't think there's a solution to this issue...
Hello Cindy,
When USU had some canonical problems with v1.5.5f I was forced to change to CEON URI Mapping (regrettably) - CEON is problematical (for me at least) and I would dearly love to go back to USU.
How best can I redirect CEON generated URL's to USU generated URL's once I have made the changeover - I realize USU can't do it so will it need to be a list of redirects in .htaccess or is there a more efficient way to do it? if it is a list in .htaccess will this slow the website down noticeably?
cheers,
Mike
Many thanks for your prompt response Cindy. That is a great idea however creating a script is beyond my capability ... having said that I agree with your comment that redirects will reduce over time - it's just the initial ranking hit that concerns me, albeit I have been there before :smile: - redirecting critical pages like categories etc should cover most of the traffic - for individual products the old url would likely go to the page not found on the site so at least it is landing on the site which means the 'link juice' would be maintained ... correct?
Once again thank you very much for your assistance.
cheers,
Mike
I've just submitted v3.0.3 of USU to the Zen Cart moderators for review; I'll post back here when it's available for download (https://www.zen-cart.com/downloads.php?do=file&id=132).
This release contains changes associated with the following GitHub issues:
#25: Remove hard-coded category indicator from categories URL.
#27: Correct issues with $_GET array parameters.
#28: Correct attributed-product-in-cart link back to product page (attribute restoration).
#29: Don't add 'manufacturers_id' parameter to any product-info type page.
#30: Update various queries, using integer values, for future-proofing.
Unfortunately :censored:, there's a potential for a mySQL fatal error using v3.0.3 if your store's setting for Format of alternate URLs is parent or the setting for Display categories as directories is short.
You'll see logs similar to
I've got the update staged on GitHub, changing /includes/classes/usu.php, starting at line 1241, fromCode:[08-Nov-2019 15:37:05 America/New_York] Request URI: /zc155fusu/beacH-vrb-exTra/configuration.php?gID=31&cID=585&action=save, IP address: ::1
#1 trigger_error() called at [C:\xampp\htdocs\zc155fusu\includes\classes\db\mysql\query_factory.php:171]
#2 queryFactory->show_error() called at [C:\xampp\htdocs\zc155fusu\includes\classes\db\mysql\query_factory.php:143]
#3 queryFactory->set_error() called at [C:\xampp\htdocs\zc155fusu\includes\classes\db\mysql\query_factory.php:218]
#4 queryFactory->Execute() called at [C:\xampp\htdocs\zc155fusu\includes\classes\usu.php:1256]
#5 usu->generate_categories_cache() called at [C:\xampp\htdocs\zc155fusu\includes\classes\usu.php:84]
#6 usu->__construct() called at [C:\xampp\htdocs\zc155fusu\beacH-vrb-exTra\includes\classes\observers\UsuAdminObserver.php:29]
#7 UsuAdminObserver->__construct() called at [C:\xampp\htdocs\zc155fusu\includes\autoload_func.php:79]
#8 require(C:\xampp\htdocs\zc155fusu\includes\autoload_func.php) called at [C:\xampp\htdocs\zc155fusu\beacH-vrb-exTra\includes\application_top.php:171]
#9 require(C:\xampp\htdocs\zc155fusu\beacH-vrb-exTra\includes\application_top.php) called at [C:\xampp\htdocs\zc155fusu\beacH-vrb-exTra\configuration.php:10]
--> PHP Fatal error: 1054:Unknown column 'c.parent_id' in 'on clause' :: SELECT c.categories_id AS id, c.parent_id, cd.categories_name AS cName, cd2.categories_name as pName
FROM categories AS c, categories_description AS cd
LEFT JOIN categories_description AS cd2
ON c.parent_id = cd2.categories_id
AND cd2.language_id = 1
WHERE c.categories_id = cd.categories_id
AND cd.language_id = 1 ==> (as called by) C:\xampp\htdocs\zc155fusu\includes\classes\usu.php on line 1256 <== in C:\xampp\htdocs\zc155fusu\includes\classes\db\mysql\query_factory.php on line 171.
toCode:if (USU_FORMAT == 'parent' || USU_CATEGORY_DIR == 'short') {
$sql =
"SELECT c.categories_id AS id, c.parent_id, cd.categories_name AS cName, cd2.categories_name as pName
FROM " . TABLE_CATEGORIES . " AS c, " . TABLE_CATEGORIES_DESCRIPTION . " AS cd
LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " AS cd2
ON c.parent_id = cd2.categories_id
AND cd2.language_id = {$this->languages_id}
WHERE c.categories_id = cd.categories_id
AND cd.language_id = {$this->languages_id}";
} else {
$sql =
"SELECT categories_id AS id, categories_name AS cName
FROM " . TABLE_CATEGORIES_DESCRIPTION . "
WHERE language_id = {$this->languages_id}";
}
Code:if (USU_FORMAT == 'parent' || USU_CATEGORY_DIR == 'short') {
$sql =
"SELECT c.categories_id AS id, c.parent_id, cd.categories_name AS cName, cd2.categories_name as pName
FROM " . TABLE_CATEGORIES . " AS c
LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " AS cd2
ON c.parent_id = cd2.categories_id
AND cd2.language_id = {$this->languages_id}, " . TABLE_CATEGORIES_DESCRIPTION . " AS cd
WHERE c.categories_id = cd.categories_id
AND cd.language_id = {$this->languages_id}";
} else {
$sql =
"SELECT categories_id AS id, categories_name AS cName
FROM " . TABLE_CATEGORIES_DESCRIPTION . "
WHERE language_id = {$this->languages_id}";
}
I've just submitted v3.0.4 to correct the following issues introduced in v3.0.3 and will post back when it's available for download.
This release contains changes for the following issues, introduced in v3.0.3:
#31. (a) Faulty query results in fatal MySQL error.
#31. (b) Restore use of ENABLE_SSL_CATALOG when creating storefront links from the admin.
v3.0.4 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=132
As noted above, v3.0.3 should be bypassed due to the errors I introduced; all v3.0.3 updates are present (and corrected, if needed) in v3.0.4.