Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

How very odd.

My /admin/includes/english.php must have been overwritten to a default recently in an upgrade.

setlocale(LC_ALL, ['en_AU.UTF-8', 'en_AU.UTF8', 'ena_au']);

the other english.php remains like above too.

I've changed it but it remains the same.

Could you direct me in which file its picked up in the addon code and I will see if its my set-up.

Mark

 

Edited by MyBookShop

Share this post


Link to post
Share on other sites

It is in this file:  includes/modules/header_tags_seo/header_tags_opengraph.php

Share this post


Link to post
Share on other sites

Thanks J,

What I think I've learnt.

if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) {
    $loc = explode(',',$_SERVER["HTTP_ACCEPT_LANGUAGE"]);
    $ogArray['locale']  = str_replace('-', '_', $loc[0]);

HTTP_ACCEPT_LANGUAGE is a Apache2/NGNIX variable that's passed thou to PHP and is probably set in the servers config.ini files.

The '<meta property="og:locale" content="en_US" />' is not about location as I thought, but about language, here being English_US style.

So its not important like I thought, changeable, but ultimately not really worth the effort.

Thanks m8

Share this post


Link to post
Share on other sites

Have just installed Header Tags 3.3.12 

I needed to add to catalog_only_new_files\admin\includes\languages\english\header_tags_seo.php

 

define('HEADING_TITLE_HTS', '<b>Errors:</b>');
define('TEXT_CLOSE_POPUP_HTS', 'Close');

Anyway a couple of questions if anyone can help,

1) Even with the permissions for /includes/header_tags.php  set to 777 I still get an error message that the permissions are set to the wrong level, is there a simple way to see if the file is being sucessfully updated so I can happily ignore it?

2) Should there be a button to update the "Deafult Tags" on the Page Control page of header_tags_test.php? I used phpmyadmin to set my values.  In the right column there are 2  "Submit Query" links for the Meta Tags and add a Pseudo Page options.

3) Finally on www.storegalore.co.uk testing on cpath 13 the keywords are not poulated as shown below, any ideas anyone?

 

image.thumb.png.34fa33c8efb02b2e8d2ac884b8a93b52.png

 

header_tags_seo.php


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites

Hi Geoffrey,

2 hours ago, geoffreywalton said:

1) Even with the permissions for /includes/header_tags.php  set to 777 I still get an error message that the permissions are set to the wrong level, is there a simple way to see if the file is being sucessfully updated so I can happily ignore it?

The code checks the permissions on the includes/header_tags.php file and compares them to those of the images directory. So first compare the two and change the former if different. There is also an option in the settings to ignore the difference. You probably know that it is not a good idea to use permissions of 777 so I suggest changing that, if possible.

 

2 hours ago, geoffreywalton said:

2) Should there be a button to update the "Deafult Tags" on the Page Control page of header_tags_test.php? I used phpmyadmin to set my values.  In the right column there are 2  "Submit Query" links for the Meta Tags and add a Pseudo Page options.

The default tags are set with the same button that sets the meta tags.

 

2 hours ago, geoffreywalton said:

3) Finally on www.storegalore.co.uk testing on cpath 13 the keywords are not poulated as shown below, any ideas anyone?

You have to enter cPath=13 in the View Result box.

Share this post


Link to post
Share on other sites

Thanks for the quick feedback!!

1) The error message showed when the permissions on header_tags.php were 755 and 777. I didn't just want to turn off the error message if something was supposed tpo be writen to this file, so as I suspect the file is updated by actions on this screen wondered if there was a simple test you could recomend. Guess I'll try updating some keywords, accessing that page on the site and seeing if the file size/date time/ contents of header_tags.php  changes.

2) I thought it might be that, but even though I added extra words in the default keywords box and clicked on save and they just disappeared, so I am unable to update them without using phpmyadmin.

3) The screenshot above is after entering "cpath=13" in the box and clicking on view results check box. I would expect "Storage, storage units, Wymondham, Attleborough, Heathersett, Hingham, Barnham Broom, Catfield, Ludham" from the keywords box above to appear in the empty keywords box above the save key, not for it to be empty and highlighted in red.

When entering the same data on the test page, the From Site Meta Keywords field is blank and highlighted in red.

Whilst I am here could I ask if the Keywords screen should be populated automatically? The showing page drop down is empty but the display drop down has 3 values.

 

image.thumb.png.49835fbec4692b0dc65e2e19c9331695.png

 


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites

So I added a search word to the table

INSERT INTO `headertags_keywords` (`id`, `keyword`, `counter`, `last_search`, `google_last_position`, `google_date_position_check`, `found`, `ip_number`, `language_id`) VALUES ('1', 'storage', '1', '0000-00-00 00:00:00.000000', '0', '0000-00-00 00:00:00.000000', '0', '0', '1');

Which disyled on the keywords page but clicking on get position button gave these errors, I am using the from the 1.0.7.4 and later files.

 

image.thumb.png.012e5e88cb18560f7b3ca267208ab602.png


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites

Finally, for tonight, I went on to the test screen, testing for cpath / 13 works fine using index.php but when using products id 20 you get 2 error messages both for redirection limit reached.

It would be a nice touch if the combination of Index.php and a product id threw an error message as should product_info and cpath. I don't think these combinations are possible in a shop.

 

image.thumb.png.df5b1ede15581161f8ff889a6596c519.png


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites

I think you are trying to outsmart the code. There's no need to be making database changes, assuming you have a working installation. Also, it would surprise me if the url check in the test page worked since I haven't done anything with that code for years. 

Regarding the permissions on the includes/header_tags.php file, they are set to enable writing because when a page is added in admin's Page Control, the file gets edited. For some servers just having the permissions set to 644 will work. In any case, if they do not match those of the images directory and you don't want to change those of the file to match those settings, then turning the option off is the only choice.

For the keywords, be sure the setting for them is enabled, and not set to True. There was a mistake in an earlier version of the database file and if you didn't update it, that setting will be incorrect.

For the View Result on Page Control, you said the cpath was set in the box for it but if you look at the image you uploaded, it isn't.

For the keyword check, I see that it is failing because the code is still using definitions. I will fix that in the next version.

Regarding the error on the test page, as mentioned, I haven't changed that code in some time. I will fix it in the next version if I have time.

Share this post


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

I think you are trying to outsmart the code. There's no need to be making database changes, assuming you have a working installation.

True, I dont think I have a working installation, So I went back and read everything again and uninstalled the db and installed it again.

In the root directory of the installation package there are 2 files Install_ReadMe_First and Install_ReadMe_Last. The DB installation file in this read me first is to use http://www.mysite.com/headertags_seo_db_handler.php, then there is another installation text file in Use_if_version_Phoenix_V_1.0.7.4_and_later which says to use https://www.yoursite.com/headertags_seo_db_handler_hybrid.php

There are installation files for each branch so deleting these 2 top level read me files would be helpful!!!!!

So this time I used the Hybrid to uninstall and install.

4 Header tag modules have been removed and the changes to classes/seo.class.php not yet done as Enable use Header Tags SEO as name? is still set to false.

Went to Page control and selected Add Missing Pages.

Then Fill Tags and selected to fill missing tags.

This has cured the keywords not being populated in the Test page and and view result on Page Control, but FYI when you check the show results check box the input box on the screen is reset with the default prompt and the input value is lost, so it appears as if nothing has been input.

On the fill page I have selected index.php, so I can get a "Save" button visible, then I populated all the default meta fields, clicked on "Save" and they all disappear.

 

These are the Header Tags SEO settings

Quote
Separator - Description -  
Separator - Keywords ,  
Search Keywords False  
Store Keywords True  

Not sure which parameter you are refering to but have tried Store Keywords as False as well.

 

 

So I still have the problem of being unable to set the default tags and will have to continue to outsmart the code!!!

 

 

One question that occurred to me digging around is should header tags have a unique key page_name/language_id?

                               sortorder_root_3 tinyint(2) default 1 NOT NULL, 
                               sortorder_root_4 tinyint(2) default 1 NOT NULL, 
                               language_id int DEFAULT 1 NOT NULL, 
                               KEY idx_page_name (page_name), 
                               KEY idx_page_description (page_description), 
                               KEY idx_page_keywords (page_keywords) 

 

 


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites
1 hour ago, geoffreywalton said:

The DB installation file in this read me first is to use http://www.mysite.com/headertags_seo_db_handler.php, then there is another installation text file in Use_if_version_Phoenix_V_1.0.7.4_and_later which says to use https://www.yoursite.com/headertags_seo_db_handler_hybrid.php

I apologize for the problems this caused. Managing more than one version of oscommerce has always been bothersome but now with multiple versions of Phoenix included, it gets a little harder.

For the View Result box entry disappearing and the details going away when the default tags are set,  they are working find for me here so I may have made some change that fixes them. 

1 hour ago, geoffreywalton said:

One question that occurred to me digging around is should header tags have a unique key page_name/language_id?

Maybe on a very large site. 

Share this post


Link to post
Share on other sites

I put it down as my fault for not actually reading all the instructions carefully but am looking at the non updating to see if I can debug it.

Cheers

Geoffrey


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites

Problem between keyboard and seat!!!!!

The first "Submit Query" updates both the Default Tags and Meta Tags whereas I was using the Save button, seemed logical to me!!!

Cheers

Geoffrey


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

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

×