Zen Cart Logo
Forums / All Other Contributions/Addons / Ultimate SEO v3 (and v2.200) [Support Thread]

Ultimate SEO v3 (and v2.200) [Support Thread]

Views: 427,462

Results 701 to 720 of 1,706
15 Aug 2014, 5:17 AM
#701
brist avatar

brist

New Zenner

Join Date:
Jul 2013
Posts:
2
Plugin Contributions:
0

Ultimate SEO v3 (and v2.200) [Support Thread]

Bugs in Ultimate SEO 2.212

I was profiling my website and found two bugs causing category names and manufacturer names to not cache in memory. This would cause additional database queries to the categories_description, categories, and manufacturers tables. It would not be noticeable to the user except for slower performance. The file and problem is listed below.

Version 2.212 in file: includes/classes/seo.url.php

  1. ---- line 1021 --- function generate_manufacturers_cache()
$define = 'define(\'MANUFACTURER_NAME_' . $manufacturer->fields['id'] . '\', \'' . $this->filter($manufacturer->fields['name']) . '\');';

SHOULD BE:

$define = 'define(\'MANUFACTURER_NAME_' . $manufacturers->fields['id'] . '\', \'' . $this->filter($manufacturers->fields['name']) . '\');';
  1. ---- line 1059 ---- function generate_categories_cache()
$cPath = $this->get_full_cPath($category->fields['categories_id'], $single_cID);

SHOULD BE:

$cPath = $this->get_full_cPath($category->fields['id'], $single_cID);
  1. If anyone makes these changes, you need to flush the SEO_CACHE table from a MySQL shell:
DELETE FROM seo_cache;

It will regenerate on the next page load.


After making a cursory look at the other downloadable ZIP flies it appears versions 2.x have the manufacturers bug and versions between 2.212 and 2.210 have the categories bug; however, on different line numbers. I did not look at other versions.

FYI: I'm running versions: Ultimate SEO 2.212 and Zen-cart 1.5.1


OPTIONAL: If you want to verify if this bug is occurring, you can insert the following code at the bottom of your index page.
Please do not run on a publicly accessible live site.

Categories and manufacturers caches must be turned on:
Admin -> Configuration -> UltimateSEO: Enable categories cache? and Enable manufacturers cache?

<?php
echo "<pre>CONSTANTS\n";
$def = get_defined_constants();
while(list($key,$val) = each($def)) {
    if(is_string($val)) {
        if (strpos($key, 'CATEGORY_NAME_') === 0 || strpos($key, 'MANUFACTURER_NAME_') === 0) {
            echo "define ", $key, '=', $val, "\n";
        }
    }
}
echo "\n</pre>\n";
?>

Before fixing you should see only two malformed records like below:

CONSTANTS
define CATEGORY_NAME_=category-name-here
define MANUFACTURER_NAME_=

After fixing and wiping 'seo_cache' table you should see a lot of records similar to below:

CONSTANTS
define CATEGORY_NAME_101=category-name-here
define CATEGORY_NAME_102=category-name-here
define CATEGORY_NAME_103=category-name-here
define CATEGORY_NAME_104=category-name-here
define MANUFACTURER_NAME_102=manufacturer-name-here
define MANUFACTURER_NAME_103=manufacturer-name-here
define MANUFACTURER_NAME_104=manufacturer-name-here
define MANUFACTURER_NAME_105=manufacturer-name-here
...
18 Aug 2014, 5:31 PM
#702
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Affected Users
Any user with the manufacturer or category cache enabled.

Symptoms
Notices about CATEGORY_NAME_ and MANUFACTURER_NAME_ already defined (rare). No performance gain from enabling the manufacturer or category cache. A minor performance hit causing each cache entry (category or manufacturer) to be pulled twice (once for each in the database and once for each displayed on a page).

Cause and Bugfix
Code generating the manufacturer and category caches does not actually populate the caches. Please use the fix posted by brist.

A big Thank You to brist for uncovering, reporting, and posting a fix for the bug.

19 Aug 2014, 9:01 AM
#703
buggrub_com avatar

buggrub_com

New Zenner

Join Date:
Jul 2013
Location:
Cambridge, UK
Posts:
9
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

I am using a new build of Zencart 1.5.3 and after installing step 3 of the installation instructions of "ultimate_seo_urls_212" I got a 500 Internal Server Error when trying to load my admin login page to continue installation.

After doing some investigation and replacing the files copied in the install process, I found that the following file was causing this problem:-

..\admin\includes\functions\general.php

Replacing this file with my backup file instantly enabled me to log in again.

I continued with step 4 of the installation instructions and got the confirmation message that it had been installed OK.

With SEO enabled, my site shows 404 errors for all of the updated URL's. Disabling SEO my site works as it originally did. I am guessing that not having the correct "general.php" file in place is causing this. Can someone please help me understand what is in this file that is causing my admin area not to work.

Thanks

19 Aug 2014, 1:03 PM
#704
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

This has not been updated for Zen Cart 1.5.3 yet. A new version is in the works.

19 Aug 2014, 1:06 PM
#705
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

lhungil:

This plugin already works in 1.5.3. I also have an updated version close to release.

jeking:

This has not been updated for Zen Cart 1.5.3 yet. A new version is in the works.

You are HALF right..

This module WORKS with v1.5.3, AND a new version is in the works..

19 Aug 2014, 6:31 PM
#706
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

BugGrub.com:

I am using a new build of Zencart 1.5.3 ... I found that the following file was causing this problem: "/admin/includes/functions/general.php" ...
Ultimate URLs 2.212 will work no problem under Zen Cart 1.5.3. The catch? With Ultimate URLs version 2.212, you will need to manually merge the changes into core files. No drag and drop overwrites of core files.

I'd suggest rolling back all files to before installation of Ultimate URLs, then re-install (and manually merge core files). You may want to take a look at the example modified files from Zen Cart 1.5.2 RC2 during the process (will be closer to the ones found in Zen Cart 1.5.3 versus the Zen Cart 1.5.1 files included in the plugin download).

Reverting the core files and manually merging in changes required for Ultimate URLs would be my first step.

BugGrub.com:

... With SEO enabled, my site shows 404 errors for all of the updated URL's. Disabling SEO my site works as it originally did. ...
Once manual merging of the core files is completed, it would be very useful to see the "development" site where you are installing / testing this module. A full copy of your Zen Cart .htaccess (and any .htaccess file in a parent folder) will also be useful (use "CODE" tags - the # button in the editor on the Zen Cart forums). Or if you really do not want us to see the website at all... provide the URLs (old and new) and the Zen Cart page where the URLs are found.

29 Aug 2014, 8:49 PM
#707
coucho avatar

coucho

Zen Follower

Join Date:
Jan 2008
Location:
Memphis, USA
Posts:
298
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

I was sent here from the ecommerce browser forum because we cant figure out the issue. Apparently the ecommerce browser plug in has issues dealing with seo url rewriters such as this plug in which I have installed on my site. We tried modifying the ht access file without success. Does anyone here have both plug ins installed and if so how did you get around the problem of the facebook app pulling product images and descriptions from your website.

Any suggestions are appreciated.

29 Aug 2014, 10:28 PM
#708
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

coucho:

I was sent here from the ecommerce browser forum because we cant figure out the issue. Apparently the ecommerce browser plug in has issues dealing with seo url rewriters such as this plug in which I have installed on my site. We tried modifying the ht access file without success. Does anyone here have both plug ins installed and if so how did you get around the problem of the facebook app pulling product images and descriptions from your website.

Any suggestions are appreciated.

I suggested you come here, but you have not provided even a scintilla of the information needed for the author of this module to assist you..

  • what "ecommerce browser" module (DON'T assume the author knows)
  • What do you mean by "issues dealing with seo url rewriters"
  • You ask "Does anyone here have both plug ins installed" except you really have said by BOTH what you mean..
29 Aug 2014, 10:58 PM
#709
coucho avatar

coucho

Zen Follower

Join Date:
Jan 2008
Location:
Memphis, USA
Posts:
298
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

DivaVocals:

I suggested you come here, but you have not provided even a scintilla of the information needed for the author of this module to assist you..

  • what "ecommerce browser" module (DON'T assume the author knows)
  • What do you mean by "issues dealing with seo url rewriters"
  • You ask "Does anyone here have both plug ins installed" except you really have said by BOTH what you mean..

Don't worry Diva I found the issue but with an attitude like yours I am not going to share or come near this forum again.

29 Aug 2014, 11:09 PM
#710
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

coucho:

Don't worry Diva I found the issue but with an attitude like yours I am not going to share or come near this forum again.

Attitude??:laugh: REALLY???? I simply suggested that you provide the DETAILS of your issue so the author can help YOU.. he can't help if you don't provide details.. and BTW, he would ask for those SAME details.. but if that's what you consider "attitude", then okay.. shrug

not sharing your solution or coming back to this forum?? well you aren't really hurting ME persay.. SHARING your solution helps OTHERS.. but okay if you don't want to share or come back to the forum because YOU think I have an "attitude" (I don't)..:laugh:

1 Sep 2014, 1:27 AM
#711
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

[31-Aug-2014 21:08:31] PHP Fatal error: 1146:Table 'seasonbr_demo.seo_cache' doesn't exist :: DELETE FROM seo_cache WHERE cache_expires <= '2014-08-31 21:08:31' ==> (as called by) /home/seasonbr/public_html/demostore/includes/classes/seo.url.php on line 1245 <== in /home/seasonbr/public_html/demostore/includes/classes/db/mysql/query_factory.php on line 155

Getting this error, not sure why because I don't have a table with that name, any hints? BTW I am using this on a fresh store, with just a template and this plugin, ZC v153 ...

1 Sep 2014, 4:24 AM
#712
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Fully uninstall (use the included scripts, remove the files, clean any DB entries from older versions) and then install again. The installation creates the seo_cache table.

1 Sep 2014, 9:44 PM
#713
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

lhungil:

Fully uninstall (use the included scripts, remove the files, clean any DB entries from older versions) and then install again. The installation creates the seo_cache table.

I will check it with PHPMyAdmin but I don't think there should be any DB entries as this a FRESH demo, with just the template and template modules ... Nothing else, I installed Ultimate SEO on top ... BTW ...

Problems arose when I started to modify the core files that were not intended for ZC v 153 ...
I dropped the TABLE_SEO_URL so I hope it works this time ...

6 Sep 2014, 2:40 AM
#714
brist avatar

brist

New Zenner

Join Date:
Jul 2013
Posts:
2
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

I should have mentioned in my prior post about one compatibility issue I had with Ultimate SEO working with the Dynamic Filter plugin. Ultimate SEO didn't handle PHP array GET parameters using '[]' syntax. Dynamic filter uses them to pass variables in the format of "fltOptionName[]". Here's an example:

?main_page=index&
cPath=1234&
fltPrice[]=$0 - $25&
fltPrice[]=$25 - $50&
fltPrice[]=$50 - $75&
fltSize[]=Medium&
fltPrice[]=&
fltSize[]=&
fltColor[]=White&
fltLength[]=&
fltStyle[]=

The flt* parameters are loaded into arrays which don't work with the snippets below:

seo_url.php function parse_parameters()

 342                 default:
 343                     $container[$p2[0]] = $p2[1];
 344                     break;

and:

 348         if(sizeof($container) > 0) {
 349             if($imploded_params = $this->implode_assoc($container)) {
 350                 $url .= $separator . zen_output_string($imploded_params);
 351                 $separator = '&';
 352             }
 353         }

Any chance your future release will have compatibility with array GET parameters?

FYI: This is the change I made to make them work together on my site.

  default:
      if (strpos($p2[0], '[]') === strlen($p2[0]) - 2) {
          if (isset($container[$p2[0]])) {
              array_push($container[$p2[0]], $p2[1]);
          } else {
              $container[$p2[0]] = array($p2[1]);
          }
      } else {
          $container[$p2[0]] = $p2[1];
      }
      break;
  if(sizeof($container) > 0) {
      $imploded_params = '';
      foreach ($container as $key => $val) {
          if (trim($key) == '') {
              continue;
          } else if (is_array($val) && count($val) > 0) {
              foreach ($val as $arr) {
                  if ($imploded_params != '')
                      $imploded_params .= '&';

                  $imploded_params .= $key . '=' . $arr;
              }
          } else {
              if ($imploded_params != '')
                  $imploded_params .= '&';

              $imploded_params .= $key . '=' . $val;
          }
      }
      if ($imploded_params != '') {
          $url .= $separator . zen_output_string($imploded_params);
          $separator = '&';
      }
  }
8 Sep 2014, 9:49 PM
#715
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

it's about that Call to undefined function zen_get_ip_address().

It's being caused by the admin/functions/general.php file. There were major changes from 1.5.1 to 1.5.3

The html_output.php in admin was also changed in 1.5.3 but it is a minor change.

I wasted hours last week - and some today. I wasn't sure last week which mod had caused the problem but this time I knew.

The mod still works with the 1.5.3 original files in a upgraded cart - course have no idea if that's true in a new installation.

23 Sep 2014, 11:19 AM
#716
dharrison avatar

dharrison

Zen Follower

Join Date:
Mar 2009
Location:
Essex, UK
Posts:
448
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Hi I use ultimate SEOs in a 1.5.1 site and it works like a dream.

However I have tried to add it to a new 1.5.3 and it breaks the site even by tweaking the first of the affected files (includes/classes/db/mysql/query_factory.php) even change mysql to mysqli doesn't work.

Please advise is this add-on being upgraded for use on Zencart 1.5.3? I sure hope so. :smile:

23 Sep 2014, 2:10 PM
#717
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

You do not need to edit query_factory.php from Zen Cart 1.5.3. (The included changes for 1.5.0 and 1.5.1 were to fix a known bug in the Zen Cart 1.5.0 and 1.5.1 versions of query_factory.php). The bug fix is already included in Zen Cart 1.5.2+.

As for query_cache.php, just need to add the removeFromCache() function. Rest of the affected core files are mostly 1-3 line changes (to allow the internal cache to automatically purge itself when a product / category / etc are changed - or to add the call to href_link from Ultimate URLs).

Have you gotten a chance to look at the Zen Cart 1.5.2 affected_files (attached earlier in this thread) yet? The edits in those will be close to what is needed for Zen Cart 1.5.3.

24 Sep 2014, 8:49 AM
#718
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Hello, does anyone have this working with 1.5.3? Also, I was wondering what I need to do if I move the domain name. I moved to a new domain, all my links broke. When I turn off Ultimate SEO it now works again.

24 Sep 2014, 12:45 PM
#719
dharrison avatar

dharrison

Zen Follower

Join Date:
Mar 2009
Location:
Essex, UK
Posts:
448
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

lhungil:

Have you gotten a chance to look at the Zen Cart 1.5.2 affected_files (attached earlier in this thread) yet? The edits in those will be close to what is needed for Zen Cart 1.5.3.

Didn't even know there was one. This thread has got 72 pages :blush:

24 Sep 2014, 1:26 PM
#720
dharrison avatar

dharrison

Zen Follower

Join Date:
Mar 2009
Location:
Essex, UK
Posts:
448
Plugin Contributions:
0

Re: Ultimate SEO v3 (and v2.200) [Support Thread]

Actually I have found the 1.5.2 affected files. Post number #555