Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

Hi Jack,

Updated recently and get a error for includes/header_tags.php for lines 866 & 868. This only happens when I cange something in the Page Control. I commented it out for now and the site is back up but would like to figure it out. Any ideas?

Thanks,

Matt

The code in that file is different for each site so I can't say. But it is usually due to a a file in the root that isn't a file used by the shop. For example, if you copy index.php and name it index_bkup.php, it will cause a failure.

Share this post


Link to post
Share on other sites

Hi Jack

 

I have already added Social Bookmarks - del.icio.us, digg, etc

 

And Your code also included a Social Bookmarks codes. I am wondering if I need to remove my original one or remove it from your code? Atm, I ignored your social bookmark codes, but I wanna know if your's will work better with your SEO codes or no differences at all?

 

Thanks

Edited by dontlike2pay

Share this post


Link to post
Share on other sites

Hi Jack

 

:P me again :P

 

When I tried to go to Admin-Catalog, the page doesnt display but an error message:

 

Parse error: syntax error, unexpected '<' in /catalog/admin/categories.php on line 705

 

Codes in /catalog/admin/categories.php around line 705: (Highlighted in RED)

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<script language="javascript"><!--

updateGross();

//--></script>

<?php

<?php /*** Begin Header Tags SEO ***/ ?>

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

<tr>

<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>

<td class="main">

<?php

if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_PRODUCTS == 'false')

 

 

Second Error: When I tried to go to Admin - Configuration - Header Tags SEO, The page display alone with an error message:

 

Warning: call_user_func(header_tags_reset_cache) [function.call-user-func]: First argument is expected to be a valid callback in /catalog/admin/includes/functions/general.php on line 1198

 

Codes around 1198 in general.php: (highlighted in RED)

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

if ($object == '') {

return call_user_func($function, $parameter);

} elseif (PHP_VERSION < 4) {

return call_user_method($function, $object, $parameter);

} else {

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

}

}

 

 

I know the first error is related to Header Tags SEO. Im not sure if the 2nd error has anything to do with Header Tags SEO but I Dont know if that code came with your contribution or not, I just know that no problem before adding this contribution.

 

 

Below is my testing result but I dont think that will help much regarding above 2 errors.

Test Results

Missing Code in File explain

The Header Tags head code for the product_reviews.php file cannot be found.

The Header Tags head code for the product_reviews_info.php file cannot be found.

The Header Tags head code for the product_reviews_write.php file cannot be found.

 

I think I did a good job to install this contribution. Above 3 files appeared in the result, maybe cause I didnt add those codes to replace original META lines and change Class Headpage to h1.

 

 

Thanks

Kai

Share this post


Link to post
Share on other sites

I have already added Social Bookmarks - del.icio.us, digg, etc

 

And Your code also included a Social Bookmarks codes. I am wondering if I need to remove my original one or remove it from your code? Atm, I ignored your social bookmark codes, but I wanna know if your's will work better with your SEO codes or no differences at all?

Use whichever one works best for you. There shouldn't be any difference with regards to SEO.

Share this post


Link to post
Share on other sites

When I tried to go to Admin-Catalog, the page doesnt display but an error message:

 

Parse error: syntax error, unexpected '<' in /catalog/admin/categories.php on line 705

 

Codes in /catalog/admin/categories.php around line 705: (Highlighted in RED)

 

Second Error: When I tried to go to Admin - Configuration - Header Tags SEO, The page display alone with an error message:

 

Warning: call_user_func(header_tags_reset_cache) [function.call-user-func]: First argument is expected to be a valid callback in /catalog/admin/includes/functions/general.php on line 1198

The errors mean you made mistakes in the installation. You can use the included edited categories file to isolate the problem.

Share this post


Link to post
Share on other sites

Jack

 

will the current version of this module work with v2.3?

 

I had a bit of a look at the included functions in the new 2.3 release and to be hoinest i dont really see them doing anything at all as fa as meta tags go etc?

Share this post


Link to post
Share on other sites

Jack

 

will the current version of this module work with v2.3?

 

I had a bit of a look at the included functions in the new 2.3 release and to be hoinest i dont really see them doing anything at all as fa as meta tags go etc?

 

I will partly answer my own question... No it doesnt work with 2.3 :(

 

I have the admin functioning mostly however the admin/header_tags_seo.php doesnt populate missing or all files

 

In the front end the Currently viewing: and socials tags work without issue as does the breadcrumb but the header tags dont populate on the index.php on the top category :(

 

no ideas on why they dont however... im still investigating those issues

Share this post


Link to post
Share on other sites

I will partly answer my own question... No it doesnt work with 2.3 :(

 

I have the admin functioning mostly however the admin/header_tags_seo.php doesnt populate missing or all files

 

In the front end the Currently viewing: and socials tags work without issue as does the breadcrumb but the header tags dont populate on the index.php on the top category :(

 

no ideas on why they dont however... im still investigating those issues

Header Tags works with all versions of oscommerce, even the forks. If it is not working in your shop, you either made a mistake with the installation or are using a template. If using a template, Header Tags will still work but will require different edits due to how template designers hack the oscommerce code.

Share this post


Link to post
Share on other sites

Hi Jack, I just upgraded to the latest HT SEO. Thanks for working on this. Couple things.

 

The canonical url (view source) doesn't have category info included. It's just the store URL. Meaning the canonical shows 'http://www.myshop.com/' instead of 'http://www.myshop.com/my-category-c-22_33.html' like I think it should.

 

The products canonical is OK though.

 

I am using the model number for products now in the tags. I think that will help search engines in some cases.

 

And the FCKEditor is working now for the category descriptions. That's a nice tweak.

 

Finally, what reason would there to be to use FCKEditor in the meta descriptions if they are only viewable in "view source"? Seems plain text would suffice?

 

Thanks


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Hi Jack, I just upgraded to the latest HT SEO. Thanks for working on this. Couple things.

 

The canonical url (view source) doesn't have category info included. It's just the store URL. Meaning the canonical shows 'http://www.myshop.com/' instead of 'http://www.myshop.com/my-category-c-22_33.html' like I think it should.

 

Finally, what reason would there to be to use FCKEditor in the meta descriptions if they are only viewable in "view source"? Seems plain text would suffice?

Thanks for the update. I'm not seeing a problem with the canonical tag, on any of the pages. If you are using the Header Tags cache option you may have to clear it. And if you are using a url rewriter, try turning that off, refreshing the page and see if the tag is correct then.

 

There's no reason to use the editor for the meta description. In fact, the search engines will strip out any such code. That was added along the way for some reason that eludes me at the moment. I don't recommend using it.

Share this post


Link to post
Share on other sites

Thanks for the update. I'm not seeing a problem with the canonical tag, on any of the pages. If you are using the Header Tags cache option you may have to clear it. And if you are using a url rewriter, try turning that off, refreshing the page and see if the tag is correct then.

 

 

Jack, I think it has something to do with Enable Cache --> GZip option. When I clear the cache, then change to Enable Cache --> Normal option the category canonical works OK. When I go back to the GZip option, the problem appears to recur.

 

So have cleared the cache and am leaving settings as Enable Cache --> Normal for now.

 

Thanks


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Hi,

 

I have a problem with the title and the description on product pages. There is always the default value, even if I try many times to run "fill tags".

If I select product_info.php and I check View Result, I got "Title 404 Not Found".

 

When I run "Fill tags" for the products, the result is "1224 Product tags have been filled." and then plenty of lines "Error: Product with ID of 491 and language ID of 1 is missing a name". I don't think this is a problem, the default ID language is 4, and there is no error with ID = 4.

 

Anyway I don't why I can't get a dynamic title on each product page, any clues ?

 

(Everything works fine with manufacturer and category pages)

 

Thanks !

Share this post


Link to post
Share on other sites

Good Day,

 

I am using Header Tags SEO, SEO URLs with STS.

 

I use the product_info STS html template and have put the Social Bookmarks Include into that template on my Product Information page. It displays, but the link is not correct. It displays: http://www.facebook.com/share.php?u=http://mysite.com/-p-.html&title=

The product name is missing from the link making it invalid when clicked.

 

The Social Bookmarks works great on the Category section.

 

Any ideas why it is doing this?

 

Also, I want to use the Facebook "Like" button on my products, so it tells the user how many FB users have liked the page. Will this be supported in the future?

Can you suggest a way this could be achieved now?

 

 

Many Thanks

Share this post


Link to post
Share on other sites

Jack, I think it has something to do with Enable Cache --> GZip option. When I clear the cache, then change to Enable Cache --> Normal option the category canonical works OK. When I go back to the GZip option, the problem appears to recur.

 

So have cleared the cache and am leaving settings as Enable Cache --> Normal for now.

I tried testing it here with cache in gzip mode and it worked correctly. Be sure you have made all of the updates in this last version since a number of them had to do with cache.

Share this post


Link to post
Share on other sites

I have a problem with the title and the description on product pages. There is always the default value, even if I try many times to run "fill tags".

If I select product_info.php and I check View Result, I got "Title 404 Not Found".

 

When I run "Fill tags" for the products, the result is "1224 Product tags have been filled." and then plenty of lines "Error: Product with ID of 491 and language ID of 1 is missing a name". I don't think this is a problem, the default ID language is 4, and there is no error with ID = 4.

 

Anyway I don't why I can't get a dynamic title on each product page, any clues ?

 

(Everything works fine with manufacturer and category pages)

The error indicates you have a language you are not using. That means that when you go to Page Control, there will be different sections for the various languages. If you don't complete the correct section, it won't work correctly. Also, when you run fill tags, be sure to select the correct language. In general, if you have a language declared that you are not using, it should be deleted.

Share this post


Link to post
Share on other sites

I am using Header Tags SEO, SEO URLs with STS.

 

I use the product_info STS html template and have put the Social Bookmarks Include into that template on my Product Information page. It displays, but the link is not correct. It displays: http://www.facebook.com/share.php?u=http://mysite.com/-p-.html&title=

The product name is missing from the link making it invalid when clicked.

 

The Social Bookmarks works great on the Category section.

 

Any ideas why it is doing this?

 

Also, I want to use the Facebook "Like" button on my products, so it tells the user how many FB users have liked the page. Will this be supported in the future?

Can you suggest a way this could be achieved now?

You need to disable STS and verify the bookmark code works correctly since it could be a Header Tags related problem or an STS problem.

 

The FB like button isn't related to this contribuion and requires code specific to each shop so, no, it probably won't be added.

Share this post


Link to post
Share on other sites

I tried testing it here with cache in gzip mode and it worked correctly. Be sure you have made all of the updates in this last version since a number of them had to do with cache.

 

I will go through the install again just to make sure and thank you.


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

You need to disable STS and verify the bookmark code works correctly since it could be a Header Tags related problem or an STS problem.

 

Thanks for the response Jack.

I have disabled STS and it works correctly on the standard installation. The problem must be getting it to work with STS.

Example: http://supplemento.co.uk/bsn-axis-120-caps-p-37.html

 

I have put the following code into my STS Product Info template. Is something else required?

<!--- BEGIN Header Tags SEO Social Bookmarks -->
<?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true')
include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php');
?>
<!--- END Header Tags SEO Social Bookmarks -->  

Share this post


Link to post
Share on other sites

I have disabled STS and it works correctly on the standard installation. The problem must be getting it to work with STS.

Example: http://supplemento.co.uk/bsn-axis-120-caps-p-37.html

 

I have put the following code into my STS Product Info template. Is something else required?

Yes, other changes are needed and are in the instructions.

Share this post


Link to post
Share on other sites

Yes, other changes are needed and are in the instructions.

 

Hi Jack,

 

If you mean this section:

  NOTE 2: If you are using STS and a product_info template, use this code instead:



    <table width="794" border="0" align="center" cellpadding="0" cellspacing="0">

     <tr>

      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

     </tr>

     <tr>

      <td class="smallText" align="center">$text_viewing  $text_viewing_title</td>

     </tr>

     <!--- BEGIN Header Tags SEO Social Bookmarks -->

    </table>

 

I have already inserted this code into my catalog/product_info.php file.

I have re-read the instructions and cannot see what I have done wrong.

 

Thanks

Share this post


Link to post
Share on other sites

I have already inserted this code into my catalog/product_info.php file.

I have re-read the instructions and cannot see what I have done wrong.

Hmm, I looked at the instructions and it mentions four changes that are needed. I don't know why you aren't seeing those unless you are using a very old version. You might want to download the latest version and try it.

Share this post


Link to post
Share on other sites

The errors mean you made mistakes in the installation. You can use the included edited categories file to isolate the problem.

 

Hi Jack

 

I have corrected the first error I had in /catalog/admin/categories.php

 

However I cannt solve other problems in categories.php

 

Therefore, I replaced categories.php with your original contribution for RC2 to try to eliminate the possibility that maybe problems somewhere else.

I still get 2 errors with either your original file or my modified categories.php. Please see below:

 

Error One:

error01.jpg

 

Code in Red on line 1198

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

if ($object == '') {

return call_user_func($function, $parameter);

} elseif (PHP_VERSION < 4) {

return call_user_method($function, $object, $parameter);

} else {

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

}

}

 

function tep_get_zone_class_title($zone_class_id) {

if ($zone_class_id == '0') {

return TEXT_NONE;

} else {

$classes_query = tep_db_query("select geo_zone_name from " . TABLE_GEO_ZONES . " where geo_zone_id = '" . (int)$zone_class_id . "'");

$classes = tep_db_fetch_array($classes_query);

 

return $classes['geo_zone_name'];

}

}

 

 

Error Two: (with your original categories.php file)

error02.jpg

 

Code in Red on line 662

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

 

<tr>

<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_PAGE_TITLE; ?></td>

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>

<td class="main"><?php echo tep_draw_textarea_field('products_head_title_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_title_tag[$languages[$i]['id']]) ? stripslashes($products_head_title_tag[$languages[$i]['id']]) : tep_get_products_head_title_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>

</tr>

</table></td>

</tr>

 

Error Two: (with my modified categories.php file) Same code as above.

error03.jpg

 

 

 

 

Test Results

Missing Code in File explain

The Header Tags head code for the product_reviews.php file cannot be found.

The Header Tags head code for the product_reviews_info.php file cannot be found.

The Header Tags head code for the product_reviews_write.php file cannot be found.

 

As you can see from above pics regarding the Error Two. No matter im trying to edit an already exist product or new product, that error message disrupt the Product editing page. Everything supposed to appear below thats been disrupted with the error.

 

Not sure what to do now. Please help.

 

Thanks

Edited by dontlike2pay

Share this post


Link to post
Share on other sites

However I cannt solve other problems in categories.php

The errors are saying a function that Header Tags adds is missing. You need to verify the changes have been made to admin/includes/functions/general.php.

Share this post


Link to post
Share on other sites

The errors are saying a function that Header Tags adds is missing. You need to verify the changes have been made to admin/includes/functions/general.php.

 

 

Thats great. I have checked general.php again and finally found the possible mistake.

 

Last bit code of Header Tags supposed to be inserted before final ?>. Instead, I inserted into the final set code of Ultimate URls SEO.

 

The error was look like:

// Ultimate SEO URLs v2.1

function tep_reset_cache_data_seo_urls($action){

switch ($action){

case 'reset':

tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%seo_urls%'");

tep_db_query("UPDATE configuration SET configuration_value='false' WHERE configuration_key='SEO_URLS_CACHE_RESET'");

break;

default:

break;

}

# The return value is used to set the value upon viewing

# It's NOT returining a false to indicate failure!!

return 'false';

 

/*** Begin Header Tags SEO ***/

function tep_get_category_htc_title($category_id, $language_id) {

$category_query = tep_db_query("select categories_htc_title_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'");

$category = tep_db_fetch_array($category_query);

...

...

return 'false';

}

/*** End Header Tags SEO ***/

}?>

 

I am just wondering how could this little mistake caused both errors? Esp the Error Two is clearly indicating the categories.php but general.php to me lol

 

Thanks Jack. I have not see any other problems anymore. I will play around with header tags settings and read those files in your contribution's docs folder, seems files in docs folder will help me to understand all those settings a bit more.

 

Kai

Edited by dontlike2pay

Share this post


Link to post
Share on other sites

I am just wondering how could this little mistake caused both errors? Esp the Error Two is clearly indicating the categories.php but general.php to me lol

Yes, that mistake will cause problems. If you follow the instructions as written, the installation will go much more smoothly.

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

×