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

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

×