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,490

Results 1,041 to 1,060 of 1,706
17 Jul 2016, 3:14 PM
#1041
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,955
Plugin Contributions:
8

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

augiespanoramas:

Here are the logs that I found (doubt they're useful):
seth,
i always find logs useful! :)

the problem that i see is in the generation of the links. there is a modified core file:

includes/functions/html_output.php

are you sure you followed the instructions correctly with regards to this file?

similar to radek, your modified URLs will work, ie,

augiespanoramas(dot)com/dodger-stadium-p-136

works, but ZC is NOT generating those modified URLs when outputting your webpage.

the function that generates those links is not using the aforementioned html_output functions. the first function in that script is the zen_href_link function, which checks if you have turned it on, and then generates a link for use in the template. you have to see if you are hitting that function. the beginning of that code is something like this:

/**
 * html_output.php
 * HTML-generating functions used throughout the core
 *
 * @package functions
 * @copyright Copyright 2003-2014 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 GIT: $Id: Author: DrByte  Sat Apr 19 13:30:33 2014 -0400 Modified in v1.5.3 $
 */

/*
 * The HTML href link wrapper function
 */
  function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
    global $request_type, $session_started, $http_domain, $https_domain;
    //START alternative URLs patch
    global $altURLs;
	$link = null;
    if(isset($altURLs)) {
      $link = $altURLs->href_link($page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
      if($link !== null) return $link;
    }
    // END alternative URLs patch

i am not sure if v1.5.5a has overwritten those changes, but i would check that the alternative URL patch above is in that file.

i hope that helps! good luck!

18 Jul 2016, 10:08 AM
#1042
radek avatar

radek

New Zenner

Join Date:
Oct 2015
Location:
Prague
Posts:
4
Plugin Contributions:
0

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

Hi Carlwhat,
thank for your reply.
This inspired me to double check all modified files and I copy it to server again.
I don't know, in what was the reason, but now USU works fine and shop generates the links correctly.

I think, the problem was between chair and keyboard :)
Thanks to all.

Here is my zen_href_link() function from html_output.php:

/*
 * The HTML href link wrapper function
 */
  function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
    global $request_type, $session_started, $http_domain, $https_domain, $zco_notifier;
    // START alternative URLs patch
    global $altURLs;
    // END alternative URLs patch
    $link = null;
    $zco_notifier->notify('NOTIFY_SEFU_INTERCEPT', array(), $link, $page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
    // START alternative URLs patch
    if(isset($altURLs)) {
      $link = $altURLs->href_link($page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
      if($link !== null) return $link;
    }
    // END alternative URLs patch

    if (!zen_not_null($page)) {
      die('</td></tr></table></td></tr></table><br /><br /><strong class="note">Error!<br /><br />Unable to determine the page link!</strong><br /><br /><!--' . $page . '<br />' . $parameters . ' -->');
    }

    if ($connection == 'NONSSL') {
      $link = HTTP_SERVER;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL == 'true') {
        $link = HTTPS_SERVER ;
      } else {
        $link = HTTP_SERVER;
      }
    } else {
      die('</td></tr></table></td></tr></table><br /><br /><strong class="note">Error!<br /><br />Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL</strong><br /><br />');
    }

    if ($use_dir_ws_catalog) {
      if ($connection == 'SSL' && ENABLE_SSL == 'true') {
        $link .= DIR_WS_HTTPS_CATALOG;
      } else {
        $link .= DIR_WS_CATALOG;
      }
    }

    if (!$static) {
      if (zen_not_null($parameters)) {
        $link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
      } else {
        $link .= 'index.php?main_page=' . $page;
      }
    } else {
      if (zen_not_null($parameters)) {
        $link .= $page . "?" . zen_output_string($parameters);
      } else {
        $link .= $page;
      }
    }

    $separator = '&';

    while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
    if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
      if (defined('SID') && zen_not_null(constant('SID'))) {
        $sid = constant('SID');
//      } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL_ADMIN == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
      } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
        if ($http_domain != $https_domain) {
          $sid = zen_session_name() . '=' . zen_session_id();
        }
      }
    }

// clean up the link before processing
    while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);
    while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

    if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
      while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

      $link = str_replace('&', '/', $link);
      $link = str_replace('?', '/', $link);
      $link = str_replace('&', '/', $link);
      $link = str_replace('=', '/', $link);

      $separator = '?';
    }

    if (isset($sid)) {
      $link .= $separator . zen_output_string($sid);
    }

// clean up the link after processing
    while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

    $link = preg_replace('/&/', '&', $link);
    return $link;
  }
19 Jul 2016, 1:43 AM
#1043
augiespanoramas avatar

augiespanoramas

New Zenner

Join Date:
Mar 2016
Location:
Long Island
Posts:
16
Plugin Contributions:
0

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

Radek:

I think, the problem was between chair and keyboard :)

Woah! It worked!! I tried manually editing my html_output.php and it didn't do anything different. So I listened to Radek's advice, and I retried installing all of the files again. First, I uninstalled it, then I copied each of the files again, and when it came to \ultimate_urls-215\modified_files folder, I copied the files from the /1.5.4/ folder (even though I have 1.5.5a) hoping the "closest" one may work. (I dont think I did any of these last time since it didn't list 1.5.5a) Anyway, voila...it worked!!
Thanks Carlwhat and Radek for having the same issue as me...ultimately encouraging me to retrace my steps and confirm that the issue indeed was "was between chair and keyboard :)"

8 Aug 2016, 8:13 PM
#1044
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

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

Does anyone know why this plugin is marked as *** USE AT OWN RISK *** in the plugins? There's nothing that I've found that carves the cr@p out of core-files like some other plugins ...

8 Aug 2016, 8:20 PM
#1045
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]

lat9:

Does anyone know why this plugin is marked as *** USE AT OWN RISK *** in the plugins? There's nothing that I've found that carves the cr@p out of core-files like some other plugins ...

I've always assumed it was the author just covering his behind in case something went wrong.

8 Aug 2016, 8:29 PM
#1046
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

lat9:

Does anyone know why this plugin is marked as *** USE AT OWN RISK *** in the plugins? There's nothing that I've found that carves the cr@p out of core-files like some other plugins ...

I thought it was always because of the use/non-use of a URI rewriter and nothing specific about the mechanism to make it happen, the specific code, nor the specific modifications.

It alters how your site is seen by all things navigating the Internet. Haphazardly switching to (or somewhat more importantly from) it or any such plugin can have a hard impact on the site.

9 Aug 2016, 11:11 AM
#1047
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

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

I was asking because this URI rewriter is the only one with that cautionary notice; I've seen the "label" before, but it was on a plugin that tore the :censored: out of many core files (which USU doesn't).

28 Aug 2016, 4:12 AM
#1048
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

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

Zencart 1.5.5.a

on php 5.3.29, MySQL 5.5.49

mods installed:
Edit Orders 4.1.5
Canada Post Shiping module
Flexible Footer Menu Multilingual
Flexible Language Currency Header Options
Simplified Social Share
Oneall Social Login (not operational)
Newsletter Subscribe
Column Layout Grid
Ultimate Urls 2.15

All the links get rewritten as they should no issues there. However, when I try to add a product to the cart it doesn't work. It goes to store/shopping_cart.html and it stops working from there. I've looked on IE and I get a broken page that loads only part of the footer or I get an oops it's not working. On Firefox and Chrome and get a 404 Page Not Found. Same applies to the store/specials.html , the log in page etc...

In configuration, where I found: Limit alternate URLS to the following pages

all these pages are listed and I took that to mean that they wouldn't get rewritten, am I mistaken and is it relevent to this?

these are the pages listed there: index, product_info, product_music_info, document_general_info, document_product_info, product_free_shipping_info, products_new, products_all, shopping_cart, featured_products, specials, contact_us, conditions, privacy, reviews, shippinginfo, faqs_all, site_map, gv_faq, discount_coupon, page, page_2, page_3, page_4

I checked the logs for errors but no logs gets created. I've also searched this thread and didn't find anything that worked

30 Aug 2016, 8:45 PM
#1049
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

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

I went to html validator and got rid of all the html errors and css errors... still each time I set Ultimate Seo Urls to true, I can't add anything to the cart. I then used the Debugger on Firefox and it says that the stylesheet is not loading but I can't find why.

Any help would be greatly appreciated

5 Sep 2016, 12:50 PM
#1050
su35 avatar

su35

Zen Follower

Join Date:
Oct 2011
Posts:
168
Plugin Contributions:
0

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

How to merge the admin\includes\class\plugin.php with that is from another plugin? I have installed "edit orders" which has the same file with different codes. Since it isn't original zen cart file, I have no idea how to merge them. Is anybody can help? Thanks.

5 Sep 2016, 2:26 PM
#1051
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

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

su35:

How to merge the admin\includes\class\plugin.php with that is from another plugin? I have installed "edit orders" which has the same file with different codes. Since it isn't original zen cart file, I have no idea how to merge them. Is anybody can help? Thanks.
Please refer to my post in the Edit Orders support-thread regarding a possible solution.

7 Sep 2016, 2:55 PM
#1052
su35 avatar

su35

Zen Follower

Join Date:
Oct 2011
Posts:
168
Plugin Contributions:
0

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

Thanks, lat9. I get it.
Now, another question. I had set enable whole site SSL. if I turn the ultimate urls on, all on page links were set as http://. Is there any way to fix it?

7 Sep 2016, 5:14 PM
#1053
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

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

Looking (albeit quickly) at the USU handling, I can't explain your results. Try enabling the plugin's debug mode to see what it is generating for those links.

7 Sep 2016, 5:29 PM
#1054
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

Umm, how was the whole site enabled to be SSL? If not by modifying the includes/configure.php file to have all urls goto https: then that could be part of the problem...

8 Sep 2016, 2:38 AM
#1055
su35 avatar

su35

Zen Follower

Join Date:
Oct 2011
Posts:
168
Plugin Contributions:
0

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

mc12345678:

Umm, how was the whole site enabled to be SSL? If not by modifying the includes/configure.php file to have all urls goto https: then that could be part of the problem...
includes\configure.php

define('ENABLE_SSL', 'true');

admin\includes\configure.php

define('ENABLE_SSL_CATALOG', 'true');

includes\functions\html_output.php add on line in function zen_href_link()

if(ENABLE_SSL_CATALOG){$connection = 'SSL';} 
8 Sep 2016, 3:03 AM
#1056
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]

There's the mistake, do not modify includes\functions\html_output.php

Return that the way is was and only modify the two configure files

8 Sep 2016, 3:11 AM
#1057
su35 avatar

su35

Zen Follower

Join Date:
Oct 2011
Posts:
168
Plugin Contributions:
0

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

lat9:

Looking (albeit quickly) at the USU handling, I can't explain your results. Try enabling the plugin's debug mode to see what it is generating for those links.

original code

<a href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL); ?>"><?php echo TOP_MENU_ALL_PRODUCTS;?></a>

log content

Request sent to href_link('products_all', '', 'NONSSL', true, false, true, true)
Generated URL: http://www.zencart.ca/products_all.html

Where is ultimate_urls collects the link parameters?

8 Sep 2016, 3:29 AM
#1058
su35 avatar

su35

Zen Follower

Join Date:
Oct 2011
Posts:
168
Plugin Contributions:
0

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

modify the two configure files couldn't enable the whole site SSL

I found the solution. put the added code on top

 function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
  global $request_type, $session_started, $http_domain, $https_domain, $zco_notifier;
if(ENABLE_SSL_CATALOG){$connection = 'SSL';} 

Now, the log content

Request sent to href_link('products_all', '', 'SSL', true, false, true, true)
Generated URL: https://www.zencart.ca/products_all.html
8 Sep 2016, 7:41 AM
#1059
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

If you change HTTP_SERVER define to start with https: like:

define('HTTP_SERVER', 'https://yoursite.com');

Then the entire site should be offered as https considering your other changes in includes/configure.php.

8 Sep 2016, 12:24 PM
#1060
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]

su35:

modify the two configure files couldn't enable the whole site SSL

Um, yes it could and yes it does. If you go editing other code, you're going to create problems for yourself, say like the XML Sitemap not working correctly. ;-)