Jump to content
Latest News: (loading..)
Jack_mcs

Header Tags SEO

Recommended Posts

Try replacing that file with the one from the package. Then, without going into admin, click around the shop to see if the problem is still there. If it isn't, then go into Page Control in admin and then back to the shop and see if the problem has returned. If it has, it means the code that writes to the file is causing the problem. That is almost caused by some invalid file in the root. If you have any warnings at the top of Page Control about invalid files, be sure to handle those.

 

I did replace the file several times and it works with it but as soon as I do anything that updates the file it brakes.  Then when I go in it and put the missing "}" it works as it should.

There were some "invalid filename" warnings but I excluded them with the link at the end of the line.

 

CRE or oscMax Error:  explain CRE or oscMax is running and the head code in the header_tags_seo_silo.php file has Header Tags code installed, which is a mistake. CRE or oscMax is running and the head code in the header_tags_seo_keywords.php file has Header Tags code installed, which is a mistake. CRE or oscMax is running and the head code in the header_tags_test.php file has Header Tags code installed, which is a mistake. CRE or oscMax is running and the head code in the header_tags_seo.php file has Header Tags code installed, which is a mistake.  

pixel_black.gif   Database/File Mismatch Error:  explain The number of file entries in the database (26) does not match the number in the includes/header_tags.php file (24).  Files not in the database:

  article_info.php

 

 

 

These are the errors I get when I run the test but this is with a fixed header_tags.php (added "}"). Aside from some duplicate meta descriptions (I think don't matter right?) that's it.

I am pretty good with php but I don't have time to read all the code. If you can point me at something too look for. Thanks.

Share this post


Link to post
Share on other sites

The problem is that something in your shop is confusing the Header Tags code. Then you go into Page Control, it checks the files and adds whichever ones are missing. For some reason, one of those is causing a failure. In the admin settings, turn off "Automatically Add New Pages" and turn on "ByPass New Pages Check."  Be sure to replace the file again and see if that helps.

Share this post


Link to post
Share on other sites

Here goes the daft non programmer again.....lol

 

Have installed this contribution on OSC 2.3.4. Catalog side of things seems fine and admin loads ok but as soon as I click on Admin > Catalog, all I get is a blank page.

 

Now this is probably completely wrong but read in the support thread with regards blank page and changing some code in includes>application_top.php. Any way I made the changes with the error reporting function and cleared up the errors that were then beng reported. The only one I couldn't work out was

 

 

Notice: Undefined variable: SID in /home/*****/public_html/shop/admin/includes/functions/html_output.php on line 48

 

I am not sure if this would be causing the blank page problem but that line of code is the third line down in the below (just included the entire function for show)

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
    if ( ($add_session_id == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
      if (tep_not_null($SID)) {
        $_sid = $SID;
      } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
        if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
          $_sid = tep_session_name() . '=' . tep_session_id();
        }
      }
    }

Cheers in advance

 

Ricardo


Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

This addon doesn't change either of the functions you mention. It also shouldn't cause a failure when you first go to admin unless you've made a mistake in the includes/column_left.php file. If you changed that file and your shops version doesn't use entries in that file, then that is why it fails. You can try replacing that file with your original. If that doesn't do it, see if there is an error in the error_log file in admin (or vice versa).

Share this post


Link to post
Share on other sites

This addon doesn't change either of the functions you mention. It also shouldn't cause a failure when you first go to admin unless you've made a mistake in the includes/column_left.php file. If you changed that file and your shops version doesn't use entries in that file, then that is why it fails. You can try replacing that file with your original. If that doesn't do it, see if there is an error in the error_log file in admin (or vice versa).

 

Think i gonna start a fresh on the admin changes as when I used the original /column_left.php I got the same error but for another file. Fingers crossed...lol


Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

This addon doesn't change either of the functions you mention. It also shouldn't cause a failure when you first go to admin unless you've made a mistake in the includes/column_left.php file. If you changed that file and your shops version doesn't use entries in that file, then that is why it fails. You can try replacing that file with your original. If that doesn't do it, see if there is an error in the error_log file in admin (or vice versa).

 

Just wanting to get this right....I have restored all the admin files back to pre changes I made. And wanted to check something. Despite going back to pre changes I am still seeing changes to do with this add-on, mainly on the left menu in admin. I have attached an image and was just wondering if someone could tell me if this is expected (through sql changes etc) or have I missed a file to restore?

 

http://www.raunchyrags.co.uk/boxheaders.jpg

Edited by toyzonline

Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

Ok well I now have a working install of this add-on. I do have one problem though when I click on admin>catagories I get a blank page.

 

Now after reading this thread I uploaded the catagories.php file included in the add-on download and all is fine. Having gone through the changes to the file again I am confident I have made no errors.

 

This leads me to the question of whether this contribution is compatible with the Extra Fields Contribution? I am guessing that this should be able to work as the only conflict is in the catagories file and is to do with the actual showing of the the fields within the admin for both add ons. As in when I uploaded the catagories.php from the HEO add-on despite the extra fields input fields not being shown on the products etc the live output is still working

 

Any ideas would be great?

 

I am using OSC2.3.4

 

The closest conflict in the code was:

 

 

FIND (around line 448):

    if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
      $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

REPLACE WITH:

    if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
    /*** Begin Header Tags SEO ***/
      $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag,pd.products_head_title_tag_alt, pd.products_head_title_tag_url, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_head_breadcrumb_text, pd.products_head_listing_text, pd.products_head_sub_text, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
    /*** End Header Tags SEO ***/

 

the code stated to change had some extra field code inserted between the lines to amend so my lines of code now look like:

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
// BOF Extra Fields Contribution	  
      $products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id=" . (int)$HTTP_GET_VARS['pID']);
      while ($products_extra_fields = tep_db_fetch_array($products_extra_fields_query)) {
        $extra_field[$products_extra_fields['products_extra_fields_id']] = $products_extra_fields['products_extra_fields_value'];
      }
	  $extra_field_array=array('extra_field'=>$extra_field);
	  $pInfo->objectInfo($extra_field_array);
// EOF Extra Fields Contribution
      /*** Begin Header Tags SEO ***/
      $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag,pd.products_head_title_tag_alt, pd.products_head_title_tag_url, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_head_breadcrumb_text, pd.products_head_listing_text, pd.products_head_sub_text, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
    /*** End Header Tags SEO ***/

Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

Yes, it is compatible with any addon except another meta tags addon. But you have to properly merge the code. Replacing the file will work but you will lose whatever changes you had made to the file, like Extra Fields.

Share this post


Link to post
Share on other sites

Yes, it is compatible with any addon except another meta tags addon. But you have to properly merge the code. Replacing the file will work but you will lose whatever changes you had made to the file, like Extra Fields.

 

Would it be just the code I highlighted above that would have to be merged (guessing as the outcome of both contributions work fine side by side just not the designed input fields in the catagories)?


Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

I'm not familiar with the extra fields addon, other than to know it exists, but my guess is that there are several other changes needed beyond what you posted. The best way to work on something like that is to use one of the compare programs, like WinMerge.

Share this post


Link to post
Share on other sites

I think I read the entire thread on this topic, but I cannot remember if this was asked. I have FWR SEO URLS 5 installed on a HEAVILY modified osc 2.??? store. Working right now as anticipated. I would like to install the Header Tags SEO contribution. 

 

The question I have is this: Should I uninstall URLS 5 and install the Ultimate SEO 2-2.2d-13 first? 

 

Thanks in advance for your answers!

Share this post


Link to post
Share on other sites

This addon will work with SEO 5 except for the option to change the url's via Header Tags SEO. If you don't want/need that option, then you don't need to change.

Share this post


Link to post
Share on other sites

Hello, is the latest version of this (Header Tags SEO V 3.3.2a) compatible with Oscommerce 2.3.4?

 

I noticed some things appear to be missing after copying over a brand new install. 

 

For instance, /admin/includes/languages/english.php is missing a few needed entries.

 

Thanks

 

Share this post


Link to post
Share on other sites

Yes, it is compatible but you can't just copy files. You either need to compare the files with a program like WinMerge or follow the manual installation instructions.

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

Hi Jack! 

First big thank you for the add-on! 

I am trying to install the add-on and I'm half way the install. I have just reached the part where I should see: 'Replace me in Page content.'. 

I actually see this title but the page itself is blank. This points out a php error no? 

 

Any idea how to fix this? 

 

Dear regards, 

 

Ben 

post-333031-0-26208800-1421160490_thumb.png

Share this post


Link to post
Share on other sites

As you say, there is some error. Take a look in the root directory and see if there is an error_log file. If there is, it might indicated the problem. You can also upload your original index file and then make the changes to it one at a time until it fails. There is also an included index file that may not match yours but should help to find the problem if you compare it with yours using a program like WinMerge.

Share this post


Link to post
Share on other sites

I'm working with a very old version of "header tag controller" .  The version I have has 3 columns in products_description in the database:

products_head_title_tag

products_head_description_tag

products_head_keywords_tag

 

I am upgrading to osc 2.3.4 and want to use the information already in the data base. 

 

I am sure others have been through this - but  google is letting me down - can someone point me to the threads on this.

 

I think Header Tags SEO creates database entries just the same - I know enough sql to migrate the text. 

 

I don't want to use the first x words as the meta description.


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

The first panacea for a mismanaged nation is inflation

of the currency; the second is war. Both bring a
temporary prosperity; both bring permanent ruin.
Ernest Hemingway
------------------------------------------------------------------------

Share this post


Link to post
Share on other sites

Those fields are the same as in Header Tags SEO. Their sizes have changed to be more efficient but it is not necessary to make that change, though it is helpful and you won't lose any data.

 

However, new fields have been added. The best thing to do is to delete any of the tables starting with header_tags, if any exists. Then upload and run the headertags_seo_update.php file. That will replace the tables just deleted with the proper ones, update the categories, manufacturers and products tables while leaving the data theire alone and add the settings.

Share this post


Link to post
Share on other sites

We seem to be missing each other -  this isn't what I see when I look at the code - It seems to be looking for

 

head_title

'head_description' 

'head_keywords'

 

 

In the table 'products_description' I have:

products_head_title_tag

products_head_description_tag

products_head_keywords_tag

 

Let me ask this a different way - does this use the columns I have - or ones with different names?

 

I am thinking that there is a confusion with the table 'products_description' having columns named products_head_description_tag verses a column named head_discription ?

 

What I have is from HeaderTags_V_2.5.9


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

The first panacea for a mismanaged nation is inflation

of the currency; the second is war. Both bring a
temporary prosperity; both bring permanent ruin.
Ernest Hemingway
------------------------------------------------------------------------

Share this post


Link to post
Share on other sites

As mentioned, those names have not changed. I kept them the same so that shops using the Header Tags Controller could easily upgrade. I suspect you may be looking at the fields that are part of something added by oscommerce 2.3 or some other addon. Those are completely different and not used by this addon. If you are using this addon, the procedure I mentioned for upgrading is correct.

Share this post


Link to post
Share on other sites

I've just installed on a HEAVILY modified osc store. I think all is well to this point but on my category and manufacturer pages I'm missing the title. It appears as though <h1><?php echo $htc['htc_title']; ?></h1> is showing a blank. 

 

When I look at it via inspect element in chrome there is just a <h1></h1>

 

Did I miss something in the instructions? Any way to tell what I did miss?

Also, I had major issues using the database install and did most of it manually, I am not sure if I missed something there. 

Share this post


Link to post
Share on other sites

You probably haven't checked the category and manufacturer boxes for the index.php file in Page Control.

 

No one has ever reported problems with the install script. What kind of problems did you have?

Share this post


Link to post
Share on other sites

Jack, 

 

The install file threw me some duplicate table errors, looks like I must have tried to install this quite some time ago and left a couple tables when I didn't use it. No problem really, I believe I was able to get all the tables in there. 

 

I have a ton of addons in the code so it took some time to get just the right code in for this to work (had to compare every line of the install instructions in beyond compare just to make sure I didn't break anything). I am still not sure I did everything correctly. 

 

I had not worked on the admin side of things when I noticed the empty titles. I am finishing it up today. I'll let you know if your suggestion brings the titles back. 

 

Thanks for being so attentive and supportive of your contributions. I really appreciate all your work. 

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

×