Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ULTIMATE Seo Urls 5 - by FWR Media


Recommended Posts

Any idea why I might find a cache file with the name:

 

"1_index_manufacturers_id_243Fsort3D4actgacdCAEYACoUMTA1NTU3MTUyOTgyNzM1NDUyNzEyHDAwMjJhMzdjMmVhZTBhNzI6Y29tOmVuOlVTOkwusgAFQjCNF6xHLbJF9lRbY36cOH5hX1yctcOA.cache"

 

I've seen similar strings reported when a site has been hacked, but I can't find any evidence pointing to that.  Why would this even exist?

Edited by Supertex
Link to comment
Share on other sites

  • 1 month later...

Hello expert,

 

Any one came across error  - Fatal error: Call to a member function store() on a non-object in /home/XXXX/public_html/XXXX.com/includes/modules/ultimate_seo_urls5/main/usu5.php on line 78

 

The site was working fine until yesterday. This morning we are getting error and not able to display any page.

Link to comment
Share on other sites

I have a similar error:
 

PHP Fatal error:  Call to a member function retrieveDependencies() on a non-object in /home/xxxx/public_html/includes/modules/ultimate_seo_urls5/uri_modules/standard.php on line 84
 
Here is the code it is showing the error for:
 
    public function isValidUri() {
      $dependencies = Usu_Main::i()->getVar( 'page_modules', substr( Usu_Main::i()->getVar( 'filename' ), 0, -4 ) )->retrieveDependencies();
      $validated = false;
      foreach ( $dependencies as $dep => $dummy ) {

Imatch777,
 
Here is my code for that page (line 76-86). If it helps.
 
    public function __destruct() {
      if ( defined( 'USU5_ENABLED' ) && ( USU5_ENABLED == 'true' ) ) {
        $this->getVar( 'cache' )->store( $this->getVar( 'registry' )->store() );
        if ( defined( 'USU5_OUPUT_PERFORMANCE' ) && ( USU5_OUPUT_PERFORMANCE == 'true' ) ) {
          performance();
        }
        if ( defined( 'USU5_DEBUG_OUPUT_VARS' ) && ( USU5_DEBUG_OUPUT_VARS == 'true' ) ) {
          usu5_show_vars( $this->vars );
        }
      } 
    } // end destructor

Link to comment
Share on other sites

When things stop working overnight, may be talk with your hosting company...what cache system are you using? Try switching it to file a good chance that was a php/mysql upgrade last night...

 

 

Hello expert,

 

Any one came across error  - Fatal error: Call to a member function store() on a non-object in /home/XXXX/public_html/XXXX.com/includes/modules/ultimate_seo_urls5/main/usu5.php on line 78

 

The site was working fine until yesterday. This morning we are getting error and not able to display any page.

Link to comment
Share on other sites

Different error, have you tried using another rewriting method? I still think you have  a setup issue...

 

 

 

I have a similar error:
 

PHP Fatal error:  Call to a member function retrieveDependencies() on a non-object in /home/xxxx/public_html/includes/modules/ultimate_seo_urls5/uri_modules/standard.php on line 84
 
Here is the code it is showing the error for:
 
    public function isValidUri() {
      $dependencies = Usu_Main::i()->getVar( 'page_modules', substr( Usu_Main::i()->getVar( 'filename' ), 0, -4 ) )->retrieveDependencies();
      $validated = false;
      foreach ( $dependencies as $dep => $dummy ) {

Imatch777,
 
Here is my code for that page (line 76-86). If it helps.
 
    public function __destruct() {
      if ( defined( 'USU5_ENABLED' ) && ( USU5_ENABLED == 'true' ) ) {
        $this->getVar( 'cache' )->store( $this->getVar( 'registry' )->store() );
        if ( defined( 'USU5_OUPUT_PERFORMANCE' ) && ( USU5_OUPUT_PERFORMANCE == 'true' ) ) {
          performance();
        }
        if ( defined( 'USU5_DEBUG_OUPUT_VARS' ) && ( USU5_DEBUG_OUPUT_VARS == 'true' ) ) {
          usu5_show_vars( $this->vars );
        }
      } 
    } // end destructor

 

Link to comment
Share on other sites

First I'd like to point out that errors should never be displayed on a live site and should be written to a log.  Second, it's very helpful to have a test server running on your local machine so you can use something like xdebug with an IDE such as Netbeans so you can output a stacktrace with clickable links.  When an error pops up on screen you can click the link and it opens the page to the line in your IDE where the error occuring.  The page that actually fails is not always where the error is occuring thus the stack trace being handy.  Netbeans and xdebug are free.

 

I found these errors occuring in my log when an incorrect link is being called. 

PHP Warning:  Invalid argument supplied for foreach() in /home/xxxxxxx/public_html/includes/modules/ultimate_seo_urls5/page_modules/index.php on line 114
PHP Fatal error:  Call to a member function store() on a non-object in /home/xxxxxxx/public_html/includes/modules/ultimate_seo_urls5/main/usu5.php on line 78

 

There are some lines where false is being strictly compared, ie "===" and it's failing.  By changing it to a looser comarison, ie "==" it seems to solve the errors.  This is probably not the best way to solve this since strict comparison is better than loose, so you can try this at your own risk.

Changing on the lines below.

     if ( false ===

to

     if ( false ==

ultimate_seo_urls5\main\usu5.php around line 160

and

ultimate_seo_urls5\page_modules\index.php around line 110

and

ultimate_seo_urls5\page_modules\product_info.php aroundline 98

      if ( false === $text_array ) {

to

      if ( false == $text_array ) {

 

In the case of "ultimate_seo_urls5\page_modules\index.php" where it should return false it's failing the false comparison and failingf on the foreach on line 114.  This shows in the strack trace.

Edited by John W

I'm not really a dog.

Link to comment
Share on other sites

I was still getting

Call to a member function store() on a non-object in /home/xxxxxxx/public_html/includes/modules/ultimate_seo_urls5/main/usu5.php on line 78

So, I changed line 77 to

      if ( is_object('cache') && defined( 'USU5_ENABLED' ) && ( USU5_ENABLED == 'true' ) ) {

I think this solved the error.  Otherwise it assumes if  USU5_ENABLED is true that cache is enabled. 

Edited by John W

I'm not really a dog.

Link to comment
Share on other sites

Link to comment
Share on other sites

I see another potential problem in the contribution but I haven't investigated its effect thoroughly.  The function "utf8_encode" is being used which is only supposed to be used with ISO-8859-1 and not UTF-8, which is what current versions are using as standard.  Below is a quote from the php online manual found at http://php.net/utf8_encode

 

"Please note that utf8_encode only converts a string encoded in ISO-8859-1 to UTF-8. A more appropriate name for it would be "iso88591_to_utf8". If your text is not encoded in  ISO-8859-1, you do not need this function. If your text is already in UTF-8, you do not need this function. In fact, applying this function to text that is not encoded in ISO-8859-1 will most likely simply garble that text."

I'm not really a dog.

Link to comment
Share on other sites

  • 2 weeks later...

hello usu5 support,

 

Ultimate Seo Urls 5 by FWR

is this recommended for bootstrap.

 

could someone post what a seo url is supposed to look like so i can check it with what is coming up with mine. like this??

 

site.com/prodcut-9404-digital-cellphone-7005p-2121.html

 

thanks.

Edited by zpupster
Link to comment
Share on other sites

  • 2 weeks later...

Hello, I'm trying to install this addon on a 2.3.4 BT, but I couldnt find the following to replace:

 

in includes/functions/general.php my function read like this:

// Redirect to another page or site
  function tep_redirect($url) {
    if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) { 
      tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
    }

    if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
      if (substr($url, 0, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)) == HTTP_SERVER . DIR_WS_HTTP_CATALOG) { // NONSSL url
        $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)); // Change it to SSL
      }
    }

    if ( strpos($url, '&') !== false ) {
      $url = str_replace('&', '&', $url);
    }

    header('Location: ' . $url);

    tep_exit();
  }

and in includes/application_top.php my function read like this:

// set php_self in the local scope
  $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']);
  $PHP_SELF = substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG));

  if ($request_type == 'NONSSL') {
    define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
  } else {
    define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
  }

in includes/modules/product_listing.php my function read like this:

tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']);
Link to comment
Share on other sites

Hello @@Psytanium,

 

 

in includes/functions/general.php my function read like this:

Just replace your complete tep_redirect function, but keep this part of your original function:

    if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
      if (substr($url, 0, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)) == HTTP_SERVER . DIR_WS_HTTP_CATALOG) { // NONSSL url
        $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)); // Change it to SSL
      }
    }

This has been updated I believe in 2.3.4 and is not updated in the SEO URL5 instructions.

 

 


and in includes/application_top.php my function read like this:

// set php_self in the local scope
  $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']);
  $PHP_SELF = substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG));

  if ($request_type == 'NONSSL') {
    define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
  } else {
    define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
  }

 

Its the same, has been updated in osc2.3.4, just use this for reference.

 

 

in includes/modules/product_listing.php my function read like this:

tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']);

 

Find:

    $prod_list_contents .= '       <div class="col-xs-6 text-right">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'sort', 'cPath')) . 'action=buy_now&products_id=' . $listing['products_id']), NULL, NULL, 'btn-success btn-sm') . '</div>';

Replace with:

    $prod_list_contents .= '       <div class="col-xs-6 text-right">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'sort', 'cPath', 'products_id')) . 'action=buy_now&products_id=' . $listing['products_id']), NULL, NULL, 'btn-success btn-sm') . '</div>';

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

  • 2 weeks later...

I've suddenly started getting a few errors show up in Webmaster Tools regarding a Dec 31, 1969 date.  When I look at the XML file, the last entry of sitemapCategories, is:


  -<url>

     <loc>http://www.mysite.com/index.php?cPath=_</loc>

     <lastmod>1969-12-31</lastmod>

     <changefreq>weekly</changefreq>

     <priority>0.5</priority>

  </url>

</urlset>

All of the preceeding entries show correct, SEO-friendly links.  Any idea why it's running into this at the end of the XML construct?  Webmaster tools also shows the error coming from the sitemapIndex.xml, but I believe that's due to the reference in the index to sitemapCategories.  It looks like it gets to the end of the categories list, and finds no remaining category, so of course no date, and the above entry is the result.

Link to comment
Share on other sites

@@Supertex, the error should stem from your Google XML Sitemap SEO...start from there to troubleshoot...I use a different XML sitemap with FWR's USU5 so I don't know for sure...
also, I would post a question in that XML sitemap SEO thread for sure...

 

 

I've suddenly started getting a few errors show up in Webmaster Tools regarding a Dec 31, 1969 date.  When I look at the XML file, the last entry of sitemapCategories, is:


  -<url>

     <loc>http://www.mysite.com/index.php?cPath=_</loc>

     <lastmod>1969-12-31</lastmod>

     <changefreq>weekly</changefreq>

     <priority>0.5</priority>

  </url>

</urlset>

All of the preceeding entries show correct, SEO-friendly links.  Any idea why it's running into this at the end of the XML construct?  Webmaster tools also shows the error coming from the sitemapIndex.xml, but I believe that's due to the reference in the index to sitemapCategories.  It looks like it gets to the end of the categories list, and finds no remaining category, so of course no date, and the above entry is the result.

Link to comment
Share on other sites

Actually, I'm not using the Google XML Sitemap SEO anymore (it doesn't create friendly urls), but instead just using the one that comes with USU5 Pro.  I call the mysite.com/usu5_sitemap/index.php in a browser, daily.  Bearing that in mind, you still think this has something to do with Google XML?

Link to comment
Share on other sites

I'm using the same sitemap generator and it's not a problem I see. That looks like it could be a default date that's being inserted instead of a current date.  Are you able to check this in your database with phpmyadmin or the like?  You could also make a small change to the item or category and see if it changes.   It lists categories and products with the oldest change last.

 

Is the url it lists correct?  I'm assuming you've modified what your showing.

I'm not really a dog.

Link to comment
Share on other sites

Well, I've figured out the cause, but not what to do to fix it.

 

Here's the deal:  I have several categories that are not active...as in no products yet.  I did not want my human-readable sitemap to show them.  So, I added a "categories_status" column to the categories table and added a 'where' clause into the queries of the human-readable sitemap files - problem solved.  I only recently became aware that the XML sitemaps were causing these hidden categories to be indexed by Google, so I added the same 'where' clause to the usu5_sitemaps/index.php.  The problem appeared immediately after this.  So it appears that this alone has caused the issue, but I don't understand why, or how to fix it.  Here's the categories section of the usu5_sitemaps/index.php file:

  function categoriesFullScan(){
    $sql = "SELECT categories_id, parent_id, date_added, last_modified FROM " . TABLE_CATEGORIES . " WHERE categories_status > 0 GROUP BY categories_id ORDER BY date_added ASC, last_modified ASC";
    return tep_db_query($sql);
  }

  function buildCategoriesCache() {
    $result = categoriesFullScan();
    while ( $row = tep_db_fetch_array( $result ) ) {
      $categories[$row['categories_id']] = array( 'id'       => $row['categories_id'],
                                                  'parent'   => $row['parent_id'],
                                                  'path'     => '', 
                                                  'last_mod' => ( strtotime( $row['last_modified'] ) > strtotime( $row['date_added'] ) ) ? $row['last_modified'] : $row['date_added'] );
    }
    tep_db_free_result($result); // Housekeeping

    foreach ( $categories as $cat_id => $key ) {
      if ( $key['parent'] != '0' ) {
        ( isset( $categories[$key['parent']]['children'] ) && ( $categories[$key['parent']]['children'] !== null ) ) ? null : $categories[$key['parent']]['children'] = '';
        $categories[$key['parent']]['children'] .= $key['id'] . ',';
      } else {
        $categories[$key['id']]['path'] .= $key['id'];
      }
    }

    foreach ( $categories as $cat_id => $key ) {
      $fullcatpath = '';
      if( $key['parent'] != '0' ) {
        $fullcatpath = setCpath( $categories, $key['id'] );
        $categories[$key['id']]['path'] = $fullcatpath;
      }
    }
    return $categories;
  }

"WHERE categories_status > 0" is what I added to hide the appropriate categories from the XML sitemap.  When I remove that text, the sitemap no longer produces the errant entry.  Also, the errant entry is a ghost - it's not a category at all:

<loc>http://www.mysite.com/index.php?cPath=_</loc>

And I've checked the DB...all of my categories have a 'real' date, both for created and for modified, which is neither here nor there, as the entry isn't actually a category.  And the time stamp is 'Unix epoch' time, so yes, it's a default that's being used because it can't find an actual date for created or modified.  I could understand this if there were two different queries, and row counts didn't match, but from what I can tell here (and I'm no expert, mind you) the 'FullScan' is the only query in use.  What have I missed here? 

Edited by Supertex
Link to comment
Share on other sites

@@Supertex, good that you had resolved the issue, and you kinda lost me in how you did it. Now, I too use a "category_status" column...two comments:

 

1) I apply the status only for the menu/nav categories tree class, and I let both the regular sitemap and xml sitemap to show the "inactive" status categories. I want my "inactive" categories remain indexed and being crawled.

 

2) In the categories tree class should a parent node being inactive I would stop the "tree-walk" so it may eliminate the issue you had... 

Link to comment
Share on other sites

  • 3 weeks later...

Dears,


rewrites aren't supported on Windows servers. These rewrites for Linux mod_rewrite module. would you please help to provide the rewrites for Windows 'URL Rewrite' asap?


 


we hosting support IIS URL Rewrite Module , Plesk for Windows 11.5.30  Microsoft IIS 7.5  now


 


Thanks & Best Regards,


Sunrise99


Link to comment
Share on other sites

  • 2 weeks later...

@@sargon2112...you can download it from my github and I have the BS installation instructions there too. Use file based or sqlite caching scheme is ok. MySQL still needs to be fixed and I am waiting for the PDQ rollout first, and memcache your host needs to support it...

 

https://github.com/clustersolutions/Ultimate_Seo_Urls_5_PRO_BS/archive/master.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...