Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

20 hours ago, Jack_mcs said:

If possible, you could try this:

Create a backup of all of HTS tables as well as the categories , manufacturers and products - data only, not the structure.  

Run the database script with the delete option and re-install.

Repopulate the fields with the backup.

I don't recommend doing this on a live shop but, if there are not any problems, it is safe to do. :)

Hello Jack, since the sites in question are large live sites I set up a new test site, PHOENIX 1.0.7.4, and I get the same error when trying to duplicate a product (no other addons). Editing works fine, filling tags works fine but not duplicating. 

Share this post


Link to post
Share on other sites
2 hours ago, artfulweb said:

I set up a new test site,

Just to be clear, did you use a new database (one that didn't have HTS installed)? 

Share this post


Link to post
Share on other sites
Posted (edited)
2 minutes ago, Jack_mcs said:

Just to be clear, did you use a new database (one that didn't have HTS installed)? 

Yes, did a fresh install of Phoenix 1.0.7.4 into a new database and then installed HTSEO. Nothing else in the database.

Edited by artfulweb
missing a sentence

Share this post


Link to post
Share on other sites

Very strange since it works fine here. Although I'm testing it with the development shop I used to create it so maybe I have something set that affects this. I will install it into a new shop when I get the chance and see what happens.

Share this post


Link to post
Share on other sites
1 minute ago, Jack_mcs said:

Very strange since it works fine here. Although I'm testing it with the development shop I used to create it so maybe I have something set that affects this. I will install it into a new shop when I get the chance and see what happens.

OK. It does the same thing with a fresh install of PHOENIX 1.0.7.5 also.

Share this post


Link to post
Share on other sites

Hi Jack, I found a solution that works. In admin/categories.php

==========================

FIND line 360

==========================

           /*** Begin Header Tags SEO ***/
            require_once('includes/functions/header_tags_general.php');
            $hts_fields = GetHTSFieldList();
      
            $db = [
              'products' => [
                'products_quantity' => null,
                'products_model' => null,
                'products_image' => null,
                'products_price' => null,
                'products_date_added' => 'NOW()',
                'products_date_available' => null,
                'products_weight' => null,
                'products_status' => 0,
                'products_tax_class_id' => null,
                'manufacturers_id' => null,
                'products_gtin' => null,
              ],
              'products_description' => [
                'products_id' => null,
                'language_id' => null,
                'products_name' => null,
                'products_description' => null,
                'products_url' => null,
                'products_viewed' => 0,
                'products_seo_title' => null,
                'products_seo_description' => null,
                'products_seo_keywords' => null,
                    $hts_fields['input']  
              ],
 

==========================

CHANGE TO

==========================

           /*** Begin Header Tags SEO ***/
            //require_once('includes/functions/header_tags_general.php');
            //$hts_fields = GetHTSFieldList();
      
            $db = [
              'products' => [
                'products_quantity' => null,
                'products_model' => null,
                'products_image' => null,
                'products_price' => null,
                'products_date_added' => 'NOW()',
                'products_date_available' => null,
                'products_weight' => null,
                'products_status' => 0,
                'products_tax_class_id' => null,
                'manufacturers_id' => null,
                'products_gtin' => null,
              ],
              'products_description' => [
                'products_id' => null,
                'language_id' => null,
                'products_name' => null,
                'products_description' => null,
                'products_url' => null,
                'products_viewed' => 0,
                'products_seo_title' => null,
                'products_seo_description' => null,
                'products_seo_keywords' => null,
                      //$hts_fields['input']
                'products_head_title_tag_alt' => null, 
                'products_head_title_tag_url' => null, 
                'products_head_breadcrumb_text' => null, 
                'products_head_listing_text' => null, 
                'products_head_sub_text' => null, 
                'products_head_additional_words' => null,  
              ],
 

Share this post


Link to post
Share on other sites
Posted (edited)

Oops another little ick... If there is a second language, when you click on the "Language Specific" tab the hts fields appear at the top BEFORE the product name, description, etc instead of below it. Bizarre.

Edited by artfulweb
Sentence not completed

Share this post


Link to post
Share on other sites

OK. Thanks for letting me know. When I get a chance to look at this I will add a second language and test this too.

Share this post


Link to post
Share on other sites
Posted (edited)

hi Jack, @Jack_mcs

Thank you very much for the great addon, I installed in all different osc versions, the latest one is CE1075,
just one page have the error message header_tags_seo.php
 

1054 - Unknown column 'mi.manufacturers_seo_keywords' in 'where clause'

select mi.manufacturers_id, mi.languages_id, m.manufacturers_name from manufacturers_info mi left join manufacturers m on (mi.manufacturers_id = m.manufacturers_id) where (mi.manufacturers_seo_title = '' or mi.manufacturers_seo_title IS NULL or mi.manufacturers_seo_description = '' or mi.manufacturers_seo_description IS NULL or mi.manufacturers_seo_keywords = '' or mi.manufacturers_seo_keywords IS NULL )

[TEP STOP]

any idea what i might did wrong and how to fix it?

at my manufacturers.php I have modified the code so that it can search and list up with manufacturers by letter

     $manufacturers_query_raw = "select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified      from manufacturers "   . $search . $manufacturer_name_filter . " order by manufacturers_name";

if i change it with your code,

          

 /*** Begin Header Tags SEO ***/
            $manufacturers_query_raw = "select m.*, mi.* from manufacturers m LEFT JOIN manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '" . (int)$languages_id . "' order by m.manufacturers_name";
            /*** End Header Tags SEO ***/

it will have error message
Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from manufacturers m LEFT JOIN manufacturers_info mi on m.manufacturers_id = mi' at line 1

I guess maybe this is the one causing the problem, but i don't know how to modify the $manufacturers_query_raw  to make both your addon and search work together....

thanks!

 

Edited by ce7

Share this post


Link to post
Share on other sites
6 hours ago, ce7 said:

1054 - Unknown column 'mi.manufacturers_seo_keywords' in 'where clause'

The above field is part of the core code but it was added in a later version of the CE branch, as i recall.  You can run this command and it should fix that error. But the last version of this addon was based on the Frozen version of CE so you may have to use an older version of this addon to get it to work.

ALTER TABLE manufacturers_info ADD manufacturers_seo_keywords VARCHAR(255) NULL;

 

Share this post


Link to post
Share on other sites
17 hours ago, Jack_mcs said:

The above field is part of the core code but it was added in a later version of the CE branch, as i recall.  You can run this command and it should fix that error. But the last version of this addon was based on the Frozen version of CE so you may have to use an older version of this addon to get it to work.


ALTER TABLE manufacturers_info ADD manufacturers_seo_keywords VARCHAR(255) NULL;

 

Hi Jack, @Jack_mcs

Thank you for the prompt reply. The alert SQL fixed the error, thank you.
So if i keep the $manufacturers_query_raw  without using your code, will that affect anything or is there a way to make both working?
 

Maybe this is a silly question, how do i confirm if it works, how I can test on CE1075 to know if something wrong?

Share this post


Link to post
Share on other sites
9 hours ago, ce7 said:

So if i keep the $manufacturers_query_raw  without using your code, will that affect anything or is there a way to make both working?

If you don't make that change, you won't be able to control the title and tags for manufacturers. If you don't use manufacturers, you can skip all of the changes for that file. But if you do, you should make the changes.

I don't see anything wrong with the code you posted and it should work in your shop but here is the one written for your shop so using it might help:

$manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag, mi.manufacturers_htc_title_tag_alt, mi.manufacturers_htc_title_tag_url from manufacturers m LEFT JOIN manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '" . (int)$languages_id ."' order by m.manufacturers_name";

But I think you may be using the wrong version for the installation guide. You have a CE shop, as opposed to a Phoenix shop, as i understand it. And the code you mentioned is only in the Phoenix section. You should be using the Frozen directory for the changes so you may want to recheck things using that directory.

Share this post


Link to post
Share on other sites
Posted (edited)

Hello Friends, please your help, any support or idea will be welcome.

I am running Header Tags SEO V 3.2.6 on osCommerce v2.3.1 (PHP 5.3.29).

I need to shown pages specially product pages with its own TAGs.

I can run the Fill Tags tool without problems and can see tags filled according that in each product in my catalog but these tags are not been showing in meta tags on my page. No matter that I put on Product Meta Tag Information (Title Tag, Description Tag or Keywords Tag) nothing is shown on my site. The only exception is when I fill the right columm on Page Control with Default Tags (global), but it sets all pages with the same generic tags.

 

The other symthom I can see is when I use Check URL tool, no matter what file I check, it always give the same on test results. Here is an example but it is the same for each file.

Test Results
  languages in the Header Tags table are: 1 ( Espanol ).
Title and Meta Tag results for conditions.php  explain
 Espanol
  From Site:
    Title -> 302 Found
    Meta Description ->
    Meta Keywords ->
  From Settings:
    Title ->
    Meta Description ->
    Meta Keywords ->
  Results of scan:
    conditions.php is missing data. Fill Tags should be ran.

It is like if Header Tags SEO can not put anything on Meta TAG on pages except the default tags on all pages.

Thanks a lot in advanced.


Thanks a lot in advanced.

Edited by elara

Share this post


Link to post
Share on other sites

@elaraTake a look at the page in Page Control (index.php for categories, product_info.php for products). On index.php, make sure you have the categories checkbox checked. For product_info, make sure you have the products checkbox checked. For unique pages, make sure you have something entered in the boxes above the checkboxes for that page (in Page Control).

Share this post


Link to post
Share on other sites

Hello Jack,

could you please confirm whether your contribution works on Phoenix 1.0.7.7? 
I installed it on 1.0.7.6 where it was working ok, however, after upgrading to 1.0.7.7 I had to uninstall it because I get a 500 error on admin side.

Triple-checked my modified admin/categories.php file for errors: no errors on file and the 500 error still there on admin side...

Share this post


Link to post
Share on other sites

Yes, it should. I installed it in a 1.0.7.7 shop a few weeks ago and it is working fine. The version I use has some differences from the released version but only things like warning fixes and display changes. None that would prevent a 500 error, at least none that I can think of.  You can check your sites error_log file when that error occurs to see the reason, or ask your host to look at it. The 500 error can be caused by many things so troubleshooting it can be difficult without knowing the cause of the failure.

Share this post


Link to post
Share on other sites

Thanks Jack.

What really puzzles me is that I have started getting 500 error after upgrading to 1.0.7.7....nonetheless, I will take your advice and start  investigating the cause of the issue...

Share this post


Link to post
Share on other sites

Jack, I have tried a new contribution install from scratch and the 500 error is gone. 

Everything would appear to work as it should, except for a strange behaviour as follows: if I click on any product page, the HTS line below the product correctly shows "Currently viewing: product name" and the "Popular searches" tag box in the footer shows up nicely, whereas if I do the same on index.php or any other product category page, I get  " HTS_TEXT_VIEWING: category name "  or  "HTS_TEXT_VIEWING: index page title " and the "Popular searches" tag box in the footer also shows "BOX_HEADING_HEADERTAGS_TAGCLOUD" instead of "Popular searches".

Pressing the "test" button on admin side returns the following:

Results of scan:

    index.php is missing Header Tags code or it is not installed correctly. Verify that Fill Tags has been ran and that the root checkbox or the default checkboxes have been checked in Page Control.

then, if I do exactly as suggested, I get the following error in Page Control: Missing sort orders are not allowed -> index.php

Can you tell me where did I go wrong?

 

 

  "HTS_TEXT_VIEWING

Share this post


Link to post
Share on other sites

For the currently viewing problem, in includes/hooks/shop/siteWide/header_tags_seo_currently_viewing.php file, find this line:

           global $category_depth, $header_tags_array, $product_info;

and add this after it:

           include_once('includes/languages/' . $_SESSION['language'] . '/header_tags_seo.php');

Regarding the test page, it may not return valid results in Phoenix. I made some changes to it but it may need more work. But the missing sort order message means you have a checkbox checked in Page Control but you didn't enter a number in the sort order box beside it.

Share this post


Link to post
Share on other sites

I think I am narrowing it down to the roots of the issue. 

10 hours ago, mendoh said:

" HTS_TEXT_VIEWING: category name "  or  "HTS_TEXT_VIEWING: index page title " and the "Popular searches" tag box in the footer also shows "BOX_HEADING_HEADERTAGS_TAGCLOUD" instead of "Popular searches".

While the above issue disappeared (probably a matter of browser cache flushing/page refresh after installing the HTS contribution) and accessing admin side does not give me a 500 error any more, a 500 error is however displayed after clicking on categories/products in admin. 

Since the issue appears to lay within the categories.php file, I followed your troubleshooting guide and test-compared my modified categories.php with the one included with your contribution files and found out that the main differences are related to the file itself, not the contribution modifications. 

As long as I could understand, everything is related to this string:  const DIR_FS_CATALOG_IMAGES = DIR_FS_CATALOG . 'images/'; (which is NOT present in your version of categories.php)   along with quite a few other following strings in the file that all relate to the same images/ directory, e.g.: 

tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES  (your version of categories.php)  VS  tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/'  (updated 1.0.7.7 version of categories.php) 

Then, if I replace my 1.0.7.7-updated and modded categories.php file with the categories.php file included with your contribution, I get no more 500 error when clicking on categories/products in admin, however, the following error is displayed:

Error: Catalog images directory does not exist: %s

I suppose both your provided admin/categories.php file and its related modifications as included in your latest contribution version are just incompatible with 1.0.7.7?

Share this post


Link to post
Share on other sites

The released version was uploaded prior to 1.0.7.7 so there will be differences in the files. For example, DIR_WS_CATALOG_IMAGES doesn't exist in 1.0.7.7. When I said I have a working version here and that the differences would not cause your problem, I had only checked the actual HTS files, not the core files in the shop that get changed. As you have found, there are changes there that won't work. I do apologize for the oversight in my check. I will get an updated version uploaded, hopefully in the next few weeks.

Share this post


Link to post
Share on other sites

Thanks Jack, roots of the issue found at last. 

I will keep waiting for the release of your updated version, then.

 

Share this post


Link to post
Share on other sites

A new version has been uploaded with these changes:

  • Added a check to the currently viewing hook to check for Article Managers setting.
  • Added a check to the social icons hook to check for Article Managers setting.
  • Changed code to prevent php warnings in later versions of Phoenix.
  • Fixed admin hook to work for multiple language sites.
  • Moved the css file to ext/css/.
  • Replaced one of the changes to categories.php with a hook.
  • Rewrote the tagcloud module to display better and to be responsive.

Please note:

  1. This upgrade only affects Phoenix shops.
  2. It will run on the latest version: 1.0.7.8

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

×