Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

Posting back in case anyone else runs into my scenario posted above (delimter error). I reconfigured my includes/configure.php to put a / in the DIR_WS_HTTP_CATALOG definition, but that still didn't resolve the error. It was actually the DIR_FS_CATALOG definition that needed to be changed and hard-coded. It's now resolved.

 

Robert,

 

Your instructions suggested sending along any notes that users found during installation. While doing the manual edit/upload method for 2.2, in step #1 it states that the files being uploaded are new files. When I got to the includes/boxes/languages.php file, that actually over-writes the existing one. It gave me pause, but after examining them, I went ahead and uploaded the new one (saving the original, of course). Not sure if putting a note to installers to overwrite their old file will ease their decision at the point or not. Just a thought.

 

We are SO looking forward to getting this rolling. Thanks so much for all your work on it.

Share this post


Link to post
Share on other sites

Posting back in case anyone else runs into my scenario posted above (delimter error). I reconfigured my includes/configure.php to put a / in the DIR_WS_HTTP_CATALOG definition, but that still didn't resolve the error. It was actually the DIR_FS_CATALOG definition that needed to be changed and hard-coded. It's now resolved.

 

Just to confirm for other users.

 

There was no bug in USU5 PRO, in this case the users includes/configure.php file was wrong.

 

DIR_FS_CATALOG must contain the full path to the root of the shop installation.

Share this post


Link to post
Share on other sites

Hello,

 

I searched the post but I did not see it was mentioned...

 

I noticed an error when I was trying to update my sitemaps in google webmaster tools. The sitemapIndex file created by the sitemap tool in the extras does not seem to be conforming to the specifications described in http://sitemaps.org/protocol.php as in:

 

This is confirmed .. thanks for reporting: -

 

catalog/usu5_sitemaps/index.php

Find ( lines 32 to 81 )

 

 function usu5_xml_init( &$doc, &$root) {
$doc = new DOMDocument('1.0', 'UTF-8');
$doc->formatOutput = true;
$root = $doc->createElement( "urlset" );
$root->setAttribute("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9");
$doc->appendChild( $root );
 }

 function usu5_node_create( &$doc, &$root, $detail ) {
$parent = $doc->createElement( "url" );
$current = $doc->createElement( "loc" );
$current->appendChild(
$doc->createTextNode( $detail['url'] ) );
$mod = $doc->createElement( "lastmod" );
$mod->appendChild(
$doc->createTextNode( $detail['lastmod'] ) );
$freq = $doc->createElement( "changefreq" );
$freq->appendChild(
$doc->createTextNode( $detail['freq'] ));
$priority = $doc->createElement( "priority" );
$priority->appendChild(
$doc->createTextNode( $detail['priority'] ));
$parent->appendChild( $current );
$parent->appendChild( $mod );
$parent->appendChild( $freq );
$parent->appendChild( $priority );
$root->appendChild( $parent );
 }
 /**
 * Create the sitemap index
 */
 $detail = array();
 usu5_xml_init( $doc, $root);
 $path = realpath( dirname( __FILE__ ) . '/../' ) . '/';
 $detail = array( 'url' => $path . 'sitemapCategories.xml',
      			'lastmod' => date( "Y-m-d" ),
      			'freq' => 'weekly',
      			'priority' => '0.5' );
 usu5_node_create( $doc, $root, $detail );
 $detail = array( 'url' => $path . 'sitemapProducts.xml',
      			'lastmod' => date( "Y-m-d" ),
      			'freq' => 'weekly',
      			'priority' => '0.5' );
 usu5_node_create( $doc, $root, $detail );
 $detail = array( 'url' => $path . 'sitemapManufacturers.xml',
      			'lastmod' => date( "Y-m-d" ),
      			'freq' => 'weekly',
      			'priority' => '0.5' );
 usu5_node_create( $doc, $root, $detail );
 usu5_xml_exists( $doc, 'sitemapIndex.xml' );

 

Change to ..

 

 function usu5_xml_init( &$doc, &$root, $index = false ) {
$doc = new DOMDocument('1.0', 'UTF-8');
$doc->formatOutput = true;
if ( false === $index ) {
 	$root = $doc->createElement( "urlset" );
} else {
 	$root = $doc->createElement( "sitemapindex" );
} 
$root->setAttribute("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9");
$doc->appendChild( $root );
 }

 function usu5_node_create( &$doc, &$root, $detail, $index = false ) {
if ( false === $index ) {
 	$parent = $doc->createElement( "url" );
} else {
 	$parent = $doc->createElement( "sitemap" );
}
$current = $doc->createElement( "loc" );
$current->appendChild(
$doc->createTextNode( $detail['url'] ) );
$mod = $doc->createElement( "lastmod" );
$mod->appendChild(
$doc->createTextNode( $detail['lastmod'] ) );
$freq = $doc->createElement( "changefreq" );
$freq->appendChild(
$doc->createTextNode( $detail['freq'] ));
$priority = $doc->createElement( "priority" );
$priority->appendChild(
$doc->createTextNode( $detail['priority'] ));
$parent->appendChild( $current );
$parent->appendChild( $mod );
$parent->appendChild( $freq );
$parent->appendChild( $priority );
$root->appendChild( $parent );
 }
 /**
 * Create the sitemap index
 */
 $detail = array();
 usu5_xml_init( $doc, $root, true );
 $path = realpath( dirname( __FILE__ ) . '/../' ) . '/';
 $detail = array( 'url' => $path . 'sitemapCategories.xml',
      			'lastmod' => date( "Y-m-d" ),
      			'freq' => 'weekly',
      			'priority' => '0.5' );
 usu5_node_create( $doc, $root, $detail, true );
 $detail = array( 'url' => $path . 'sitemapProducts.xml',
      			'lastmod' => date( "Y-m-d" ),
      			'freq' => 'weekly',
      			'priority' => '0.5' );
 usu5_node_create( $doc, $root, $detail, true );
 $detail = array( 'url' => $path . 'sitemapManufacturers.xml',
      			'lastmod' => date( "Y-m-d" ),
      			'freq' => 'weekly',
      			'priority' => '0.5' );
 usu5_node_create( $doc, $root, $detail, true );
 usu5_xml_exists( $doc, 'sitemapIndex.xml' );

Share this post


Link to post
Share on other sites

The last bit was wrong it should be ..

 

  /**
 * Create the sitemap index
 */
 $detail = array();
 usu5_xml_init( $doc, $root, true );
 $path = realpath( dirname( __FILE__ ) . '/../' ) . '/';
 $detail = array( 'url' => tep_href_link( 'sitemapCategories.xml' ),
              	'lastmod' => date( "Y-m-d" ),
              	'freq' => 'weekly',
              	'priority' => '0.5' );
 usu5_node_create( $doc, $root, $detail, true );
 $detail = array( 'url' => tep_href_link( 'sitemapProducts.xml' ),
              	'lastmod' => date( "Y-m-d" ),
              	'freq' => 'weekly',
              	'priority' => '0.5' );
 usu5_node_create( $doc, $root, $detail, true );
 $detail = array( 'url' => tep_href_link( 'sitemapManufacturers.xml' ),
              	'lastmod' => date( "Y-m-d" ),
              	'freq' => 'weekly',
              	'priority' => '0.5' );
 usu5_node_create( $doc, $root, $detail, true );
 usu5_xml_exists( $doc, 'sitemapIndex.xml' );

 

For those who use the multi language functionality .. the latest version, when it is eventually made available, now creates multiple sitemaps for each language.

Share this post


Link to post
Share on other sites

Hello.

 

After installing USU5 Pro I found out that my Ajax Buy now add-on stopped working.

 

I apologize if this is the not right place to post this issue...

 

The problem is probably in tep_href_link or/and tep_redirect functions.

 

Both addons are widely used and I am sure many people have similar issue.

 

Thanks

Share this post


Link to post
Share on other sites

This is confirmed .. thanks for reporting: -

 

No problem at all.. Thanks for this addon...

 

I need some more help with a problem related to another addon interacting with USU5.

 

I have DynaMenu for oscommerce installed and I was trying to optimize it by decreasing the number of queries it uses - which becomes a problem for stores with a lot of categories and products.

 

The addon calls the

tep_href_link(FILENAME_DEFAULT, $cPath_new)

 

function and I think the modified version of this function (modified for USU5 pro that is) calls this kind of query:

 

SELECT cd2.categories_name AS pName, cd.categories_name AS cName FROM :TABLE_CATEGORIES c LEFT JOIN :TABLE_CATEGORIES_DESCRIPTION cd2 ON c.parent_id = cd2.categories_id AND c.parent_id = cd2.categories_id AND cd2.language_id = :languages_id, :TABLE_CATEGORIES_DESCRIPTION cd WHERE c.categories_id = cd.categories_id AND c.categories_id = :cid AND cd.language_id = :languages_id

 

With USU5 caching in place, shouldnt it be calling this query once and cache the result? With dynaMenu it seems to be using this query everytime on refresh the page (producing like ~400 queries for the menu)...

 

Thanks.

Share this post


Link to post
Share on other sites

With USU5 caching in place, shouldnt it be calling this query once and cache the result? With dynaMenu it seems to be using this query everytime on refresh the page (producing like ~400 queries for the menu)...

 

Thanks.

 

A menu that creates 400+ queries, that's horrific. Surely it should load categories as needed!

 

Anyway .. the way USU5 cache works is on a per page basis, once a page has been loaded once the data is cached .. BUT .. if new queries appear it will not cache those.

 

The old version of USU5 and the old series 2 Seo Urls by chemo cached everything .. this did not work with extremely large shops and created cache loading problems.

 

You should cache the menu separately as it sounds huge.

Edited by FWR Media

Share this post


Link to post
Share on other sites

For each link it creates it calls tep_href_link function - i guess that would be normal behavior right? there are over 900 categories in the store. And apparently it is not calling that query for each of them, maybe just for ones that has child categories. Though I am not exactly sure if it is the tep_href_link function that calls that db query I quoted each time... That is why I thought your input might be of help here :)

 

Would there be a reason why it would not cache on the same page? I am working through an index filed called index-test.php and checking queries through KissER query output...

 

Edit: Oh so it doesnt cache subsequent queries... Ok... But it is this function that calls that query right? I have another modification (optimize categories box) that uses single query to get those child categories. Guess I can do some modification to use those maybe..

Edited by psychoder

Share this post


Link to post
Share on other sites

Hi there, Robert

 

Quick question: We've previously run without the session id included in the URL. I see that with USU5 the session id is present. Have you had much feedback about that and/or issues people have run into with having their sites indexed that way. We have Google set to ignore that parameter, but outside of that option where we can hope they ignore it and not count it as duplicate content or cause complications with visitors arriving through that link, are there issues to be expected by having the site indexed with those?

 

Thanks!

Share this post


Link to post
Share on other sites

I believe the 'freq' and 'priority' tags are not normally in the protocol for the sitemapIndex structure.

 

 /** 
 * Create the sitemap index 
 */ 
 $detail = array(); 
 usu5_xml_init( $doc, $root, true ); 
 $path = realpath( dirname( __FILE__ ) . '/../' ) . '/'; 
 $detail = array( 'url' => tep_href_link( 'sitemapCategories.xml' ), 
               'lastmod' => date( "Y-m-d" ), 
               'freq' => 'weekly', 
               'priority' => '0.5' ); 
 usu5_node_create( $doc, $root, $detail, true ); 
 $detail = array( 'url' => tep_href_link( 'sitemapProducts.xml' ), 
               'lastmod' => date( "Y-m-d" ), 
               'freq' => 'weekly', 
               'priority' => '0.5' ); 
 usu5_node_create( $doc, $root, $detail, true ); 
 $detail = array( 'url' => tep_href_link( 'sitemapManufacturers.xml' ), 
               'lastmod' => date( "Y-m-d" ), 
               'freq' => 'weekly', 
               'priority' => '0.5' ); 
 usu5_node_create( $doc, $root, $detail, true ); 
 usu5_xml_exists( $doc, 'sitemapIndex.xml' );

Share this post


Link to post
Share on other sites

Hi there, Robert

 

Quick question: We've previously run without the session id included in the URL. I see that with USU5 the session id is present. Have you had much feedback about that and/or issues people have run into with having their sites indexed that way. We have Google set to ignore that parameter, but outside of that option where we can hope they ignore it and not count it as duplicate content or cause complications with visitors arriving through that link, are there issues to be expected by having the site indexed with those?

 

Thanks!

 

Persistent session id in the querystring is a security hazard for your customers. It is nothing at all to do with USU5 it just means the shop is configured incorrectly.

Share this post


Link to post
Share on other sites

Agreed on not wishing to use them (session ids)... which we weren't. I just wasn't sure what brought them back after the installation of USU5. We'll sort it out and reconfigure.

Share this post


Link to post
Share on other sites

Agreed on not wishing to use them (session ids)... which we weren't. I just wasn't sure what brought them back after the installation of USU5. We'll sort it out and reconfigure.

 

You are mistaken, installing USU5 did not bring them back.

Share this post


Link to post
Share on other sites

I have a small issue with the sitemap (bonus)

 

I have an extra column in my categories table, setting the category status (1 = active, 0 = inactive).

The categories sitemap lists my inactive categories as well.

 

I changed the categoriesFullScan function:

$sql = "SELECT categories_id, parent_id, date_added, last_modified FROM " . TABLE_CATEGORIES . " WHERE categories_status = '1' GROUP BY categories_id ORDER BY date_added ASC, last_modified ASC";

 

Now I get this error message while executing the index.php file

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND cd.language_id = 2' at line 1

SELECT cd2.categories_name AS pName, cd.categories_name AS cName FROM categories c LEFT JOIN categories_description cd2 ON c.parent_id = cd2.categories_id AND c.parent_id = cd2.categories_id AND cd2.language_id = 2, categories_description cd WHERE c.categories_id = cd.categories_id AND c.categories_id = AND cd.language_id = 2

[TEP STOP]

 

Do you have any idea what's going on here?

Share this post


Link to post
Share on other sites

//edit

your post here seemed to fix the issue

 

Glad you got it sorted and it's nice to see someone searching the thread for already answered questions :thumbsup:

 

I'll get a revised version up soon now that 5 PRO has had some decent usage.

Share this post


Link to post
Share on other sites

yeah, thanks for that :)

 

would you please list the changes once you've upload the new version?

Because I have made some small modifications to USU5 Pro and Kss MT and I don't want to overwrite them ;p

Share this post


Link to post
Share on other sites

would you please list the changes once you've upload the new version?

Because I have made some small modifications to USU5 Pro and Kss MT and I don't want to overwrite them ;p

 

Probably not :)

 

I imagine the upgrade will simply be overwriting the module files plus one change to an admin file.

 

You'll just have to keep a record of the files you have changed. There are no massive changes just bug fixes and a few minor bits and pieces, nothing a merge and compare program couldn't handle.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Okay that's fine of course - I will have to download a file merge&compare software then.

 

I have a new question :)

I was successfully generating the XML sitemap on localhost using xampp,

now I'm online, browsing to that index.php - it does load for a small amount of time, then blanks (white).

I guess this is normal behavior, but there is no sitemap created in the the root of my domain.

 

What could be the issue here?

Share this post


Link to post
Share on other sites

Okay that's fine of course - I will have to download a file merge&compare software then.

 

I have a new question :)

I was successfully generating the XML sitemap on localhost using xampp,

now I'm online, browsing to that index.php - it does load for a small amount of time, then blanks (white).

I guess this is normal behavior, but there is no sitemap created in the the root of my domain.

 

What could be the issue here?

 

Re: merge software I can recommend the free WinMerge software as being excellent.

 

Re: your problem I would imagine the server does not allow creation of files in root .. create the files there manually and make them writeable.

Share this post


Link to post
Share on other sites

I am using the version for 2.3

 

In my admin screen, when I click on SEO Urls 5 I get this error:

 

Warning: call_user_func(tep_reset_cache_data_usu5) [function.call-user-func]: First argument is expected to be a valid callback in /home/mydir/public_html/v23/admin/includes/functions/general.php on line 1277

 

This is the function it is erroring on:

function tep_call_function($function, $parameter, $object = '') {

if ($object == '') {

return call_user_func($function, $parameter);

} else {

return call_user_func(array($object, $function), $parameter);

}

}

 

I copied this function: function tep_reset_cache_data_usu5( $action = false ) {

as instructed in the instructions to the bottom of general.php

 

The cache & sqlite are set to 755. I even changed to mysql cache - but I still get the error.

 

 

Here's my other error:

 

I have installed osc 2.3 in a sub directory of my root (v23). I have copied the usu5_sitemaps to the v23 directory. I get this error when I go to the directory on the web page:

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mydir/public_html/v23/usu5_sitemaps/index.php:1) in /home/easyturn/public_html/v23/includes/functions/sessions.php on line 102

 

I don't get any other line after this one like has been shown in other posts with this error.

 

 

Any and all help is appreciated. Thanks.

Share this post


Link to post
Share on other sites

I copied this function: function tep_reset_cache_data_usu5( $action = false ) {

as instructed in the instructions to the bottom of general.php

 

Well that error means that the function in fact was not added to ADMIN/includes/functions/general.php

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mydir/public_html/v23/usu5_sitemaps/index.php:1) in /home/easyturn/public_html/v23/includes/functions/sessions.php on line 102

 

This suggests that the file has been edited and a whitespace or perhaps a BOM added to the top of the file. ( before the opening <?php )

Edited by FWR Media

Share this post


Link to post
Share on other sites

Re: merge software I can recommend the free WinMerge software as being excellent.

 

Re: your problem I would imagine the server does not allow creation of files in root .. create the files there manually and make them writeable.

 

Thanks for that tip - you were right of course.

Sometimes I'm thinking "Why did I not get that idea? It's quite obvious" :)

Share this post


Link to post
Share on other sites

Robert,

 

I've been using USEO5 Pro and Security Pro for while now. I've now run into the 'Godaddy' issue with regards to mod rewrite.

 

I did a simple test, and indeed the rewrite works

 

RewriteEngine on
RewriteBase /
RewriteRule ^index\.html$ /index-rewrite.html [L]

 

With the above code in the root .htaccess, the index-rewrite page shows instead of the index page.

 

I uninstalled and reinstalled USEO5 Pro - I still get the 'no file specified' error. I commented out the Options +SymLinksIfOwnerMatch and Options +FollowSymLinks - no luck.

 

I've read this thread from the link you provided (did a Google search for "oscommerce.com ultimate seo urls 5 godaddy" - I'm not understanding the 'too many redirects' comment. Could you shine some light on this, and is there a real solution for Godaddy servers?

 

Thanks in advance.

 

Dave

Share this post


Link to post
Share on other sites

Hi,

 

I just had a small question regarding the URL for categories.

 

Is it possible to make the URL for categories become '/laptops.html' instead of '/laptops-c-26' ?

 

I'm sorry if that question was already asked before, but I searched and couldn't find it

 

Thanks,

Amr

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×