Jump to content
Sign in to follow this  
BlueYon

Seach Engine Friendly URL Support

Recommended Posts

Hello OSc'ers

 

For an installation of a SEO contrib I need to put 'Search Engine Safe URL's' on True. I have always had this on false but when I'am switching this option to True I get an error when clicking on a catagorie or a product.

This is the error I get:

 

Error!

Unable to determine the page link!

 

My webhost provider uses this software:

HTTP Server: Apache/1.3.33 (Unix)

PHP Version: 4.3.11 (Zend: 1.3.0)

 

Does anybody know how to fix this?

Please advise :'(

Share this post


Link to post
Share on other sites
Hi Nick,

 

the same name in the same category tree or over all categories?

 

 

All over...no cat and/or sub cat and/or product can have the same name.

Share this post


Link to post
Share on other sites
Hello OSc'ers

 

For an installation of a SEO contrib I need to put 'Search Engine Safe URL's' on True. I have always had this on false but when I'am switching this option to True I get an error when clicking on a catagorie or a product.

This is the error I get:

 

Error!

Unable to determine the page link!

 

My webhost provider uses this software:

HTTP Server: Apache/1.3.33 (Unix)

PHP Version: 4.3.11 (Zend: 1.3.0)

 

Does anybody know how to fix this?

Please advise  :'(

 

This just means that the search engine safe urls (They are still in development)dont work on your server setup...

 

Ie. you can not use this mod for sef/seo url since it depends on setting Search Engine Safe URLs to True..

 

Click the link in my signature sef & seo urls to see other alternatives

Share this post


Link to post
Share on other sites
Also, I just noticed my product pages are coming out like this:

 

http://www.fusionimports.com/parts/product...products_id/902

 

Its hard to say without knowing more about your sites setup.....

 

but the categories box might have someting to do with the cache....

 

and your urls are not being rewritten, they are still the osc search engine friendly urls, might be something with your .htaccess file

 

are you using any custom contributions for design , boxes, templates?

Share this post


Link to post
Share on other sites
Also, I just noticed my product pages are coming out like this:

 

http://www.fusionimports.com/parts/product...products_id/902

 

I am getting the same thing with pretty much a fresh install. Using Graphical Infoboxes which only changes the stylsheet.css and boxes, which I completly removed, then reinstalled them because it made no difference. Tried it with my original boxes, and no stylsheet and it still did the same thing.

 

http://clickbv.com/newoscomm/

 

I have been trying changing things for 2 days now.

 

Does anyone know the solution to this problem?

Share this post


Link to post
Share on other sites
Its hard to say without knowing more about your sites setup.....

 

but the categories box might have someting to do with the cache....

 

and your urls are not being rewritten, they are still the osc search engine friendly urls, might be something with your .htaccess file

 

are you using any custom contributions for design , boxes, templates?

 

 

I'm using graphical infoboxes (stylesheet and infobox edits) , Affiliates contribution & multi-products selection contribution. What should my .htaccess file AND categories portion of code look like? could you post that info please?

Share this post


Link to post
Share on other sites

This is what I found so far:

 

If I take my column_left.php file:

------------------------------------------

 

/*

$Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'categories.php');

}

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_manufacturers_box();

} else {

include(DIR_WS_BOXES . 'manufacturers.php');

}

-------------------------------------------------------

 

Comment out the cache commands for categories and change include to require:

 

-------------------------------------------------------

 

/*

$Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

/* if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else { */

require(DIR_WS_BOXES . 'categories.php');

// }

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_manufacturers_box();

} else {

include(DIR_WS_BOXES . 'manufacturers.php');

}

--------------------------------------------------------

 

Then it works.

 

If no one can find any other solution, I may just leave it like this. I guess it is the same as if I had cache set to false for categories only.

 

Thanks,

Paul

Share this post


Link to post
Share on other sites

Hello all!

 

I have tried to installed this module 3 times now but I always end up with the same error when I try to browse my categories.

 

the error is as follows:

 

---- 8< -------

Fatal error: Call to undefined function: read_cache() in /var/www/dinvvsbutik/www/includes/classes/url_rewrite.php on line 157

 

----------------

 

Im running a OSC 2.2 MS2 with the STS module installed. Doesnt this contribution run with STS module?

Share this post


Link to post
Share on other sites

Devilry-

 

I found the problem.

 

Disregard my last post on this thread.

 

Here is what has happened.. The Graphical Infoboxes made changes to the categories.php file version 1.23, the latest OSCOMM categories.php file is 1.25.

I made the same changes I found in Graphical Infoboxes categories.php 1.23 to the new 1.25 file, and it works!!

 

Here is the v1.25 file after I made the changes:

 

<?php

/*

  $Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

  function tep_show_category($counter) {

    global $tree, $categories_string, $cPath_array;

 

    for ($i=0; $i<$tree[$counter]['level']; $i++) {

      $categories_string .= "  ";

    }

 

    $categories_string .= '<a href="';

 

    if ($tree[$counter]['parent'] == 0) {

      $cPath_new = 'cPath=' . $counter;

    } else {

      $cPath_new = 'cPath=' . $tree[$counter]['path'];

    }

 

    $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

    if (isset($cPath_array) && in_array($counter, $cPath_array)) {

      $categories_string .= '<b>';

    }

 

// display category name

    $categories_string .= $tree[$counter]['name'];

 

    if (isset($cPath_array) && in_array($counter, $cPath_array)) {

      $categories_string .= '</b>';

    }

 

    if (tep_has_category_subcategories($counter)) {

      $categories_string .= '->';

    }

 

    $categories_string .= '</a>';

 

    if (SHOW_COUNTS == 'true') {

      $products_in_category = tep_count_products_in_category($counter);

      if ($products_in_category > 0) {

        $categories_string .= ' (' . $products_in_category . ')';

      }

    }

 

    $categories_string .= '<br>';

 

    if ($tree[$counter]['next_id'] != false) {

      tep_show_category($tree[$counter]['next_id']);

    }

  }

?>

<!-- categories //-->

 

<!-- This is where you will include you custom box header, left column and open up your Cell for your center column

Make sure you leave the first 2 tags in here "<tr> and <td>"  they maintain the control over your entire page.

If you remove these tags all of you info will be shifted below you categories box on your pages.  If you dont

Believe me, try it....lol. //-->

 

<tr>

  <td>

    <table width="144" border="0" cellspacing="0" cellpadding="1" class="infoboxborder">

      <tr>

        <td>          <table width=100% border=0 cellpadding=0 cellspacing=0 class="infoBoxContents">

            <tr>

              <td colspan=3 width="100%"> <img src="images/boxes/table_categories.jpg"></td>

            </tr>

            <tr>

              <td width="100%">

                <?php

 

  $categories_string = '';

  $tree = array();

 

  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

  while ($categories = tep_db_fetch_array($categories_query))  {

    $tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

                                                'parent' => $categories['parent_id'],

                                                'level' => 0,

                                                'path' => $categories['categories_id'],

                                                'next_id' => false);

 

    if (isset($parent_id)) {

      $tree[$parent_id]['next_id'] = $categories['categories_id'];

    }

 

    $parent_id = $categories['categories_id'];

 

    if (!isset($first_element)) {

      $first_element = $categories['categories_id'];

    }

  }

 

  //------------------------

  if (tep_not_null($cPath)) {

    $new_path = '';

    reset($cPath_array);

    while (list($key, $value) = each($cPath_array)) {

      unset($parent_id);

      unset($first_id);

      $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

      if (tep_db_num_rows($categories_query)) {

        $new_path .= $value;

        while ($row = tep_db_fetch_array($categories_query)) {

          $tree[$row['categories_id']] = array('name' => $row['categories_name'],

                                              'parent' => $row['parent_id'],

                                              'level' => $key+1,

                                              'path' => $new_path . '_' . $row['categories_id'],

                                              'next_id' => false);

 

          if (isset($parent_id)) {

            $tree[$parent_id]['next_id'] = $row['categories_id'];

          }

 

          $parent_id = $row['categories_id'];

 

          if (!isset($first_id)) {

            $first_id = $row['categories_id'];

          }

 

          $last_id = $row['categories_id'];

        }

        $tree[$last_id]['next_id'] = $tree[$value]['next_id'];

        $tree[$value]['next_id'] = $first_id;

        $new_path .= '_';

      } else {

        break;

      }

    }

  }

  tep_show_category($first_element);

 

  $info_box_contents = array();

  $info_box_contents[] = array('text' => $categories_string);

 

  new infoBox($info_box_contents);

?>

                    <!-- This is where you will close your center cell and include your right side of your box

and then finally close out your custom box.  Be sure and leave the "</td> and </tr>" tags.

they ensure the sanctity of your overall page layout. //-->

              </td>

            </tr>

          </table>

        </td>

      </tr>

    </table>   

  </td>

</tr>

 

 

 

<!-- categories_eof //-->

 

I hope this works for you.

Paul

Share this post


Link to post
Share on other sites

Hi All,

Love the contribution so far, but I'm getting the cookie_useage.php with my security set to medium

this is in my includes/config file.

 

define('HTTP_COOKIE_DOMAIN', 'www.littleandbig.com');

define('HTTPS_COOKIE_DOMAIN', 'www.host296.ipowerweb.com/~littlean');

define('HTTP_COOKIE_PATH', 'www.littleandbig.com');

define('HTTPS_COOKIE_PATH', 'wwww.host296.ipowerweb.com/~littlean');

 

I am also getting the http://littleandbig.com/links.php/lPath/1

only when I'm in my links

 

Any help would be appreciated

Thanks

Pam


Striving to go beyond Novice-suggestions always welcomed

Share this post


Link to post
Share on other sites

I guess I have to unistall it because it messed up my contribution

for "option_type feature v1.7" any ideas how to customize it to have both? I love both contributions

Thanks

Pam


Striving to go beyond Novice-suggestions always welcomed

Share this post


Link to post
Share on other sites

Ok, I need help. I tried to uninstall and came up with the error

 

Cannot instantiate non-existent class: url_rewrite in includes/functions/html_output.php on line 68

I finally got my site back up by redoing everything, but now, when you click on a category it changes the url in the heading, but doesn't change the page. I'm too tired right now to mess with it anymore, but can someone tell me what I'm doing wrong in UNISTALLING it? I love the concept, but I had my shop working so well, I hate to mess it up anymore.

Thanks

Pam


Striving to go beyond Novice-suggestions always welcomed

Share this post


Link to post
Share on other sites

I love this contribution, I really love the idea behind it. Thanks to Hilton, got it installed and mostley running. I highly recomend hilton for anyone needing help with this contribution.

 

Now, for the problem i'm haveing... My drop down navigation menu works great, but, My menu tree is looping the subcatagories.

 

Example

Cat A

Sub Cat 1,2,3

 

Cat B

Sub Cat 1,2,3

 

If I click A2 I will see A1 If I click B I will see my index page, If I click B3 I may see B1 or A1 it just loops back to a page no matter what sub cat I click.

 

Does anyone know what would cause that?

Share this post


Link to post
Share on other sites

I got the contribution to work but i have a couple of questions

 

1) my category for the jewelry part of the store comes up like this:

 

www.mysite.com/category21/index.html

 

it should say:

 

www.mysite.com/jewelry/index.html

 

How can i fix this? and ...

 

 

2) how can i put Meta Tags in each file?

 

 

thanks

Yoni

 

PS: If your getting a 403 error and you have your site on high security, put this code at the top of your .htaccess file:

 

Options +SymLinksIfOwnerMatch

 

this will make it work.

Share this post


Link to post
Share on other sites

hi great contribution,

 

all installed great. Many thanks! Will be making a small donation as soon i get my student loan!

 

however there seems to be a small bug with my shopping cart getting reset after a while. has anyone encountered a smilar problem? i can natigate around a few categories and its fine, then for some reason it will dissapear.

 

Any ideas my fellow coders?

 

any help appreciated.

:D

lee

Share this post


Link to post
Share on other sites
hi great contribution,

 

all installed great. Many thanks! Will be making a  small donation as soon i get my student loan!

 

however there seems to be a small bug with my shopping cart getting reset after a while. has anyone encountered a smilar problem? i can natigate around a few categories and its fine, then for some reason it will dissapear.

 

Any ideas my fellow coders?

 

any help appreciated.

  :D

lee

 

 

You possibly have a link that does not use the tep_href_link function

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites

I have one more problem. All my other directories that have index.html files in them cant be read, the directories are restricted and if you try to link to the index.html files you get a 500 error.

 

here is the text for my .htacess file

 

<IfModule mod_php4.c>

php_value session.use_trans_sid 0

php_value register_globals 1

</IfModule>

 

 

DirectoryIndex index.php default.php

Options +SymLinksIfOwnerMatch

#Options +FollowSymLinks

RewriteEngine on

RewriteBase /

RewriteRule ^([a-z]{2})/(.*)$ $2?language=$1&%{QUERY_STRING}

RewriteRule ^manufacturer([0-9{}]+_?[0-9{}]*)(/?.*)$ $2?manufacturers_id=$1&%{QUERY_STRING}

RewriteRule ^product([0-9{}]+_?[0-9{}]*)(/?.*)$ $2?products_id=$1&%{QUERY_STRING}

RewriteRule ^category([_0-9]+)/(.*)$ $2?cPath=$1&%{QUERY_STRING}

RewriteRule ^(.*)\.html(.*)$ $1.php?%{QUERY_STRING}

Share this post


Link to post
Share on other sites

i just noiced it appear to be recreating a new session everytime i go to a new page, yet it still keeps my shopping cart on some pages.very odd.

 

Lee

Share this post


Link to post
Share on other sites

ok..i just disabled force cookie use and it appears OK. Very odd. What was the reason that the install instructions said force cookioe use must be enabled?

 

Lee

( sorry about all the new posts but it wouldnt let me edit them for soem reason-not my day!)

Edited by leecook_999

Share this post


Link to post
Share on other sites

Hello community

 

since days I am struggeling to install a SEO Url contribution. I tried about all off the major ones min. 3 times each (including SEF Url Support), none did really work out of the box like description and YES I am one of those copy-paste newbies that bother the freaks here far too much. But I think I proceed and I try very hard believe me. 10-12 days ago I didn't have a clue about osC and php and since then, grace to this board, the result is a-multiple-over-night-and-all-day-long-24h work:

 

The framework of my wifes new webshop!

 

Not to spoil anyone, but SEF Url was even the first one tried, as I like the way the Url is "rewritten" with / much more than chemos respectable work.

 

Here my setup and working process

 

osc 2.2M2

single language single currency

 

german tax contrib (just alters zones and taxes values in DB)

Must Agree to Terms 2.2MS2v1.5.2

Print Order Receipt v1.4

Search_Box_Anywhere

Site Map MS2 - 2.3

GoogleXMLSitemapv1.3

HeaderTagsController_V_2.5.3 (complete incl. adminpart)

 

all this is runnig on identical images on apache2 with php4 and mysql

A) local on a winxp sp2 machine with mod_rewrite working nicely

B) suse 9.0 on a vhostserver (root rights)

 

the local install is running NONSSL

the online verison for the moment has an httpsdoc/ but not yet secured by my own certificate, I use the servers Plesk default cerificate whilest testing

 

everything went nice so far even the HTC install was a nice 15 min. walkthrough, but when it comes to SEO I recognize my limits. everything I did I could develop locally and get it to run on the server but SEOs diddnt work right neither here nor there

 

My questions:

Is my setup ok for SEF Urls, will it work or does anything already straightly interferes ?

I do not want to force cookies, is it just cosmetics for the url or absolutely necessary for SEF to run propperly?

 

Cache the next prob, I cannot set it on XP dunno why tried a hell no chance.

Cache seems to work on liveserver as osc admin says no error, but I do not find any files on my server??? strange enough. Changing cache from default osc configuration /tmp/ to anynything else leads to a no cache set error in admin panel???

 

and finally the old line 956 question for pasting as mentioned in manual

 

Step #6 - In In /admin/includes/functions/general.php

Before code } (around line 956) add this code

@unlink(DIR_FS_CACHE . 'url.cache');

Note: This should be the at the end of the tep_reset_cache_block function

 

I found previous threads on that but no other awnsers than what is said in the instruction, and obviously thats what I don't understand :(

 

my lines (btw 977 - 1008 ) of the general php look like this:

 

  function tep_reset_cache_block($cache_block) {
   global $cache_blocks;

   for ($i=0, $n=sizeof($cache_blocks); $i<$n; $i++) {
     if ($cache_blocks[$i]['code'] == $cache_block) {
       if ($cache_blocks[$i]['multiple']) {
         if ($dir = @opendir(DIR_FS_CACHE)) {
           while ($cache_file = readdir($dir)) {
             $cached_file = $cache_blocks[$i]['file'];
             $languages = tep_get_languages();
             for ($j=0, $k=sizeof($languages); $j<$k; $j++) {
               $cached_file_unlink = ereg_replace('-language', '-' . $languages[$j]['directory'], $cached_file);
               if (ereg('^' . $cached_file_unlink, $cache_file)) {
                 @unlink(DIR_FS_CACHE . $cache_file);
               }
             }
           }
           closedir($dir);
         }
       } else {
         $cached_file = $cache_blocks[$i]['file'];
         $languages = tep_get_languages();
         for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
           $cached_file = ereg_replace('-language', '-' . $languages[$i]['directory'], $cached_file);
           @unlink(DIR_FS_CACHE . $cached_file);
         }
       }
       break;
     }
   }
@unlink(DIR_FS_CACHE . 'url.cache');         // <======= right position ???
 }

 

if anyone could help, i would be really greatful, I dunno what to do anymor, right now I am sitting here since yesterday morning and if you don't believe it I send you a picture, or better not

 

if it realy is peanuts for one of you, then I would like to provide ftp access and maybe call you simoultaneously to damn see what freaked and fooled me for ages

 

thy in advance for all the future support on my issue

dahui

 

 

just in case, skype me : id "jumpfreak"

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
Sign in to follow this  

×