Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

Aha!

 

As you would expect, it certainly wasn't an error in the contribution - it wasn't even an error in my config files.

 

I had set up the virtual host incorrectly.

 

All is working fine now.

 

Sorry for any hassle I've caused!

 

Thanks for a great contrib!

Share this post


Link to post
Share on other sites

Hi the fact there is a query is no bug, in fact it is intentional.

 

One of the key benefits of USU5 PRO against all of the older versions ( right back to Chemos old version in 2005 ) is that it is viable for larger shops as the cache is set on a per page basis as opposed to one gigantic cache that includes everything.

 

With one gigantic cache the system breaks when the cache becomes over large which was a major problem.

 

The way USU5 works is that it caches all links that are required when the page is first loaded and the cache entry is first built .. this ensures that the main links are cached .. BUT ..

 

Most osCommerce pages have dynamic aspects where the shown product changes .. e.g. a specials box or random product box etc.

 

If the cache were to continue building ( as it did in USU5 ) then eventually the USU5 cache for a single page may in fact contain, in the case of large shops, thousands of links. The cache would become over large and the system crash.

 

So .. although the main links are cached the random links that are not present on every page load will not be.

 

Hope that makes sense.

 

 

OK. Its seams logic but the problem I am referring is on products_listing page. I guess that are the important links. How can I debug so I can test what is caching. I need to know your algorithm. (the main idea)

 

Thanks a lot.

Share this post


Link to post
Share on other sites

Hi,

 

I tried going through the thread to see if this has been covered, but with 168 pages, and the fact that the search function for these forums sucks, I didn't have any luck.

 

I'm trying to fix a site for a friend who had OSC and some contributions installed by a "Professional webmaster" who really cocked things up.

 

Since the site has Ultimate SEO Urls 2.1 installed, I was using the upgrade instructions.

 

I made it to the edits in Application_top, and came to a brick wall.

 

first off, in the upgrade instructions, I was told to look for // set php_self in the local scope

if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];

 

and replace it with some code, then I noticed, the idiot before me put in the code for osc 2.3 not 2.2 (so both were present, which probably explains why her install wouldn't work) I commented out the 2.2 line, and replace the 2.3 line with the new code, and it no longer breaks the site, which is a good thing, Sorry, didn't mean to digress.

 

the next step in application top says to find and delete the following:

 

Find and DELETE

// Ultimate SEO URLs v2.2d

if ((!defined(SEO_ENABLED)) || (SEO_ENABLED == 'true')) {

include_once(DIR_WS_CLASSES . 'seo.class.php');

if ( !is_object($seo_urls) ){

$seo_urls = new SEO_URL($languages_id);

}

}

 

That is nowhere to be found in my application_top file

 

also the next "find replace" I'm supposed to find: Find ...

// include the language translations

require(DIR_WS_LANGUAGES . $language . '.php');

 

This isn't there either.

 

Anyone have an idea? I'm completely lost in the woods right now.

 

Thanks in advance

Share this post


Link to post
Share on other sites

Anyone have an idea? I'm completely lost in the woods right now.

 

Firstly if the Ultimate SEO Urls code is not there then the old version of seo urls simply wouldn't work.

 

The code may not look EXACTLY the same ( version etc ) but it should look very similar.

 

 

The language code: -

 

require(DIR_WS_LANGUAGES . $language . '.php');

 

Must exist or the languages functionality would fail to work .. unless an exceptionally aweful code hacker has hardcoded the $languages_id

Share this post


Link to post
Share on other sites

Hi, thanks for the quick reply :)

 

As I said in my previous post, the install she put in was USU ver. 2.1 I don't know if the piece of code I'm supposed to be looking for is completely different or not, I even tried looking for bits and pieces of the lines I was supposed to look for and can't find any of it.

 

oh, and the install she had Didn't work. That's why I wanted to do the upgrade, because she screwed something up and instead of trying to fix it, she just shut off the seo urls. I told ya she really cocked things up. :op I do know that this "webmaster" should be dragged into the street and beaten severely, I've spent 2 weeks just fixing the stuff she had screwed up to the point the site wouldn't even function. (Of course she got paid anyhow because my friend didn't know any better)

 

Since I was supposed to look for that piece of code and delete, and it's not there, I'm guessing that either 1) the ver. 2.1 stuff was substantially different, or 2) she just never put it in, in the first place.

 

And yes, I was ale to find the call for languages, I guess the find feature in notepad was taking a coffee break last time I tried to find it.

 

Unless, told differently, I'm going to assume that she never pasted in that one piece of code, and try going on, hopefully I don't run into too many more messes like this.

Share this post


Link to post
Share on other sites

*It's me again. (wish we could edit existing posts, but oh well)

 

 

I was able to make the edits in application top, and the pages still load, so that's a good sign, but I ran into a new issue. (told you she really screwed things up.

 

Unless the ver. 2.1 stuff is Really different than ver 2.2 it seems she failed to add another whole block of code, I was able to make the other edits to admin/categories.php

BUT, this part: Find and DELETE

// Ultimate SEO URLs v2.2d

// If the action will affect the cache entries

if ( preg_match("/(insert|update|setflag)/i", $action) ) include_once('includes/reset_seo_cache.php');

 

didn't exist in the file again. But the other edits didn't seem to break anything.

 

Then I deleted the SEO-class file as instructed, and the site is broken, just a big white page :P

Put it back and the pages load, and the product urls seem to work in SEO format, but when you click on one it just reloads the index page.

 

Now I get to go replace all the edited files with the backups, so the site will function again.

 

anyone have any ideas at all how to make this mess work? I'm about to put a contract out on the chick that screwed this thing up so bad.

Share this post


Link to post
Share on other sites

OK, now I'm really screwed.

 

I put everything back to original, using the backup files I made for everything i had to edit, and when I click on a product, I get the following error

 

 

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

 

 

Anyone have any ideas how I can ig myself out of This hole?

 

I apologize for being a royal pain, but this site has been nothing but headaches from day 1

Share this post


Link to post
Share on other sites

OK, now I'm really screwed.

 

I put everything back to original, using the backup files I made for everything i had to edit, and when I click on a product, I get the following error

 

If your original files don't work then there's not a lot I can do.

 

Chopping and changing between Chemos v2.1 and USU5 is not going to work you have to follow the install instructions and where your files differ "read between the lines".

 

Also you say that 2.1 continued to work yet you say the include in application_top.php for the seo.class.php doesn't exist, this simply cant happen.

 

I'd suggest .. follow the install instructions for adding to a site with 2.1 seo urls installed .. THEN ..

 

Follow the instructions ( less any file uploads ) for an install into a fresh osCommerce but instead of changing files just ensure that the code parts are in place in the correct files. Ensure that you apply the changes to .htaccess as per the instructions and set RewriteBase correctly.

 

Before all this make certain that the server is running at least PHP 5.2.X

Edited by FWR Media

Share this post


Link to post
Share on other sites

""Also you say that 2.1 continued to work yet you say the include in application_top.php for the seo.class.php doesn't exist, this simply cant happen.""

 

Actually, I said version 2.1 Didn't work, it's been turned off since long before I started working on the site.

Whenever it was turned on you just got 404 errors for weird html files that didn't exist.

 

 

Every time I've tried to make any changes on this mess, I run into brick walls, most of the time I'm able to figure out how to make things work.

 

can you at least tell me what parts of the scripts handle redirects, so maybe I can hunt down the issue? the urls appear to be correct when I hover the cursor over a product, but something is getting lost in some kind of redirect. The only place I can find any redirects in the stuff I had to edit is in application top, and I even went back to a clean App top file, and still get the same redirect error

Share this post


Link to post
Share on other sites

""Also you say that 2.1 continued to work yet you say the include in application_top.php for the seo.class.php doesn't exist, this simply cant happen.""

 

Actually, I said version 2.1 Didn't work, it's been turned off since long before I started working on the site.

Whenever it was turned on you just got 404 errors for weird html files that didn't exist.

 

 

Every time I've tried to make any changes on this mess, I run into brick walls, most of the time I'm able to figure out how to make things work.

 

can you at least tell me what parts of the scripts handle redirects, so maybe I can hunt down the issue? the urls appear to be correct when I hover the cursor over a product, but something is getting lost in some kind of redirect. The only place I can find any redirects in the stuff I had to edit is in application top, and I even went back to a clean App top file, and still get the same redirect error

 

Redirect issues are almost always related to an incorrectly set up configure.php file, read back a few posts.

Share this post


Link to post
Share on other sites

Guys, I would appreciate strong help.

 

I've installed YMM module, that is a kind of filter box rewritten for 2.3.1. With many problems with it finally after some modifications found over the support thread I managed to have it working. The issue is that the module once used for filtering adds to the path ?Make="make"&Model="model"&Year="year". As far as it's working in the main shop catalog SEO is not changing the url. But when you enter into any category SEO adds it's name to the path splitting the path between index.php and the part of the path added by YMM. The result is that the call for SQL is broken.

 

You can see such action here.

 

If anyone could support me how to change that (if it's possible at all), I would appreciate.

Share this post


Link to post
Share on other sites

Thanks FWR for all the help, it's seriously appreciated. I found at least part of my problem, the previous idiot to work on these scripts (I'm the current idiot) didn't follow the instructions very well, and instead of replacing some of the code, she commented the old stuff out and pasted below. This wouldn't have been a problem if she'd been consistent but some she replaced, some she commented out and pasted below, so I'm thinking at least a couple places I pasted your new code over code that had been commented out, which would definitely break a lot of things :P

 

The redirect errors are now gone, and the site is fully functional with SEO urls turned off, but when I turn them on, product info pages are blank and the url just says product_info.php

 

I know it's not a problem with the contribution, too many ppl are using it with no problem, so my question is, do you have any idea where I may have messed up? I'd really hate to go through the whole "go back to backups and reinstall" thing again if it can be avoided.

 

I really do appreciate the help, and as soon as i have some cash in my paypal to donate I plan to give to the cause :)

Share this post


Link to post
Share on other sites

The redirect errors are now gone, and the site is fully functional with SEO urls turned off, but when I turn them on, product info pages are blank and the url just says product_info.php

 

Are you able to PM me a link to the site in question?

Share this post


Link to post
Share on other sites

If anyone could support me how to change that (if it's possible at all), I would appreciate.

 

Hi this doesn't look like the problem is related to USU5 at all, it looks like an issue with the SQL query being built in another script.

 

E.g. the url is: -

index.php/wina-czerwone-c-1?Make=Piemont&Model=BaroloDOCG&Year=2004

 

Which is perfectly valid so USU5 is doing its job, but the result is: -

 

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   p.products_status = '1' and p.products_id = p2c.products_id and  pd.produc' at line 1

 

So you need to find out what the complete query looks like and why it is wrong. Either way it is not a support issue for this contribution.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hi this doesn't look like the problem is related to USU5 at all, it looks like an issue with the SQL query being built in another script.

 

E.g. the url is: -

index.php/wina-czerwone-c-1?Make=Piemont&Model=BaroloDOCG&Year=2004

 

Which is perfectly valid so USU5 is doing its job, but the result is: -

 

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   p.products_status = '1' and p.products_id = p2c.products_id and  pd.produc' at line 1

 

So you need to find out what the complete query looks like and why it is wrong. Either way it is not a support issue for this contribution.

 

Thanks for quick reaction.

 

I'm not saying that it's an issue generated by USU5, which without the YMM is working well (standard, rewrite is not supported by the hosting). YMM standalone is working also fine (well, with all the regards to the creators, it's the only free filter I've found for 2.3.1). I think that the issue is related to the fact that YMM may filter several parts of the shop - new products, specials, search result, catalog and categories.

 

For most of those purposes SEO link looks simple: catalog - index.php, new products - products_new.php, etc. When entering to any category the url changes due to a proper USU5 reaction into the one containing already the category name:

ex.: http://www.cantine.pl/sklep/index.php/wina-czerwone-c-1

 

This seems to be a no-go for YMM filter. It seems that it's not able to filter such page. Once I disable USU5, the YMM filter works also here without the error. I think that the solution might be to switch off somehow USU for categories, keeping them on product urls. But I don't think there is an option for that, is it?

 

I think that code responsible for that SQL error is inside index.php, added by YMM. But I'm not a coder, almost blind there, so I don't know if YMM code could be modified to have them working both USU5 and YMM. And unfortunately I don't think I will get some support from YMM thread here.

 

The part of index.php:

// show the products of a specified manufacturer

if (isset($HTTP_GET_VARS['manufacturers_id'])) {
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_where : '') . " p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
     } else {
// We show them all
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_where : '') . " p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
     }
   } else {
// show the products in a given categorie
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_where : '') . " p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     } else {
// We show them all
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_where : '') . " p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     }
   }

 

Where added in the original code is only

" . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_where : '') . " 

in all 4 lines

Share this post


Link to post
Share on other sites

Thanks for quick reaction.

 

I'm not saying that it's an issue generated by USU5, which without the YMM is working well (standard, rewrite is not supported by the hosting). YMM standalone is working also fine (well, with all the regards to the creators, it's the only free filter I've found for 2.3.1). I think that the issue is related to the fact that YMM may filter several parts of the shop - new products, specials, search result, catalog and categories.

 

I support USU5 here but not other contributions so I am afraid I cannot help.

Share this post


Link to post
Share on other sites

I support USU5 here but not other contributions so I am afraid I cannot help.

 

Any possibility/suggestion than to switch off USU5 on category URLs?

 

Anyway, thanks Robert. For both - contributions and being present in the support thread.

Share this post


Link to post
Share on other sites

Any possibility/suggestion than to switch off USU5 on category URLs?

 

Anyway, thanks Robert. For both - contributions and being present in the support thread.

 

Hacking and thereby breaking the working functionality of USU5 is not the correct approach, the correct approach is to repair the script that is broken.

Share this post


Link to post
Share on other sites

Right - Here we go ...

 

Finished installation with no errors this time. However when I go into my admin panel my SEO URLs looks different to the operation file included? Mine reads:

 

SEO URLs

Enable SEO URLs?

Choose URL Type

Cache Directory

Compress SEO Cache File

 

whereas the instructions show:

 

SEO URLs 5

Enable SEO URLs

Enable the cache

Enable multi language support

Output W3C valid URIs

Select your chosen cache system ... etc etc and so on

 

So I cant follow the settings?

 

 

What am I missing? Whats my name? and where can I procure a new brain to figure this out? or am I being a doofus? (these are all Rhetorical of course) After seeing what I did wrong last time I have to say that although this is not working for me it was such an easy to follow contrib. Now it could be that when I first started this online shop a long long time ago when my coding skills where even less than I know now, I may have tried an old version but couldn't get it to work which was the case so many times back then. So I may have left something from that contrib? Help me FWR Canobi, your my only hope!

 

 

Thanks in advance for any light you can shed on the matter!

 

Cheers

Danny

Share this post


Link to post
Share on other sites

Right - Here we go ...

 

Finished installation with no errors this time. However when I go into my admin panel my SEO URLs looks different to the operation file included? Mine reads:

 

Hi Danny

 

Those are settings from an old version of seo urls by Chemo.

 

It shouldn't matter though. As soon as you run the front of the site USU5 deletes any old residual seo urls settings and replaces with the new.

 

Try closing all browsers .. visit the front of the site .. then viewing admin again.

Share this post


Link to post
Share on other sites

Thanks for the lightning response.

 

I think I will have to back track all I have done this time round and double check although I am certain I made no mistakes this time round? I tried as you suggested to close all browsers etc (on 3 different computers) with no luck?! Totally baffled ...

 

Before I start all that, could it be anything else at all that maybe causing some kind of conflict? I know its virtually impossible for you to just pluck out a solution to any and all problems that may occur but, seeing as this should have deleted any old version I just dont know where to start?

 

Thanks

Danny

Share this post


Link to post
Share on other sites

Really back-tracked now, found some of the original code from a year ago still embedded from the Chemo version USU v1.0 Must of just left that in there for a laugh? I know you said it shouldn't make a difference but, something is wrong so I have tried flushing out all of that code and I found the seo_cache, install-seo and reset_seo_cache php files still in there! Oh well - gone now.

 

Just the 5 images to delete as well from the image folder to with that contribution. Now, when I look at my admin it still reads:

 

SEO URLs

Enable SEO URLs?

Choose URL Type

Cache Directory

Compress SEO Cache File

 

How come this is still there? where would that be to delete?

 

Danny

Share this post


Link to post
Share on other sites

I just notice following error on my catalog/products_new.php page:

 

Catchable fatal error: Argument 1 passed to aPage_Modules::linkText() must be an array, null given, called in /catalog/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 170 and defined in /catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php on line 338

 

did anyone else had this problem?

 

I have OSc v 2.3.1 & Ultimate Seo Urls 5 PRO

 

Don

Share this post


Link to post
Share on other sites

I just notice following error on my catalog/products_new.php page:

 

Catchable fatal error: Argument 1 passed to aPage_Modules::linkText() must be an array, null given, called in /catalog/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 170 and defined in /catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php on line 338

 

did anyone else had this problem?

 

I have OSc v 2.3.1 & Ultimate Seo Urls 5 PRO

 

Don

 

Product_Info_Page_Module::acquireLinkText() is returning null which means that the products_id being being passed in does not return the required array of results from the database.

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

×