Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

Hey Jack, I'm not positive that this is related to this contrib or not but I keep having those letter "n's" showing up in different files and when I started tracking them down they are all located around code having to do with the Header Tags.

 

I used the sed script to create the files and when I went back into each of the edited files on my HD I was able to find this

 

// EOF: WebMakers.com Changed: Header Tag Controller v1.0
?>n

 

If you could come up with a script that would look for this string sequence in every file and then remove the "n" that would be really helpful. I will try to figure it out also but I haven't use linux commands or scripts in a couple of years when I took a class on it.

 

Just thought you might want to know and thanx for all of the help and effort that you have provided.

 

Dave.

Share this post


Link to post
Share on other sites

Most likely you are using the filemanager in admin to edit the files. It is broken and causes this problem.

 

Jack

Share this post


Link to post
Share on other sites

No I didn't use that at all, much less on every one of the affected files. Plus, I checked the files in the Autoinstall directory and none of them have the trash n.

 

I compared the file checkout_shipping_address.php in the autoinstall directory that I copied down from the base install with the same file in the edited directory. I have never opened this file until now.

 

The code from the base file:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

 

The code from the same file in the edited directory:

<head>

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v1.0
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v1.0
?>n
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

you can see the trash n right above the last line.

 

Dave.

Share this post


Link to post
Share on other sites

The only other thing I can think of is that the autoinstall scritps are corrupted. It has to be something on your end since many people have used the script without this problem. Try downloading a new version of HTC and see if that helps.

 

Jack

Share this post


Link to post
Share on other sites

Hello Everyone,

 

I don't know what is going on here.. I installed HTC about a month and a half ago and it was working fine..

 

I did the exact same thing to another site... the first install i did was actually a test to see if I could set it up correctly and I did... with Jacks help of course...

 

 

Today, I did the exact same install to a different site... everything is identicle.. server and all... except for the websites content...

 

I went to the admin area of the new install and now the fields where you can add the title, keywords, description... are missing...

 

Any idea of what is going on here?

 

I am using version 2.3.5 of the HTC contribution.

 

Thanks for your help everyone.

 

Eric B


AJ2000

Share this post


Link to post
Share on other sites

OK I really messed something up now... I decided to upload the catalog/admin/categories.php file from my original test site to this new one...

 

And now the contribution sort of works but I am getting the following error on the edit products page...

 

Fatal error: Call to undefined function: tep_get_products_head_keywords_tag() in /home/htdocs/users/ebonni34/ebonni34/bonafideauthentics.com/catalog/admin/categories.php on line 593

 

Here is the code from that line

 

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

 

Any ideas?

 

Thanks

Eric B


AJ2000

Share this post


Link to post
Share on other sites

That function is declared in admin/includes/functions/general.php. If you look in that file, do you see the function?

 

Jack

Share this post


Link to post
Share on other sites
OK I really messed something up now... I decided to upload the catalog/admin/categories.php file from my original test site to this new one...

 

And now the contribution sort of works but I am getting the following error on the edit products page...

 

Fatal error: Call to undefined function: tep_get_products_head_keywords_tag() in /home/htdocs/users/ebonni34/ebonni34/bonafideauthentics.com/catalog/admin/categories.php on line 593

 

Here is the code from that line

 

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

 

Any ideas?

 

Thanks

Eric B

 

 

Yes that function is there... here is the code for it.... it starts around line 515 in my code...

 

 }
 function tep_get_products_head_title_tag($product_id, $language_id) {
   $product_query = tep_db_query("select products_head_title_tag from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'");
   $product = tep_db_fetch_array($product_query);

   return $product['products_head_title_tag'];
 }

 function tep_get_products_head_desc_tag($product_id, $language_id) {

 

I am pretty sure there was some error in the file though... I may have even forgot to upload the one that was provided with the module... because I just reuploaded the file and now everything is working fine.

 

Thanks for helping me narrow down the problem Jack.

 

Eric B


AJ2000

Share this post


Link to post
Share on other sites

hello once more,

 

I now have a bit of a problem with the product review part of oscommerce.

 

When I go to a products page and click the button to read the reviews I get the following error...

 

Fatal error: Call to undefined function: tep_get_header_tag_products_desc() in /home/htdocs/users/ebonni34/ebonni34/bonafideauthentics.com/catalog/includes/header_tags.php on line 168

 

Also, when I click on write a review, it takes me to the form where you can write a review but when I do write a review and click continue, I get this error:

 

Fatal error: Call to undefined function: tep_get_header_tag_products_desc() in /home/htdocs/users/ebonni34/ebonni34/bonafideauthentics.com/catalog/includes/header_tags.php on line 168

 

Both errors are the same... here is the section of code from the header_tags.php file

 

/ PRODUCTS_REVIEWS_INFO.PHP and PRODUCTS_REVIEWS.PHP
 case ( strstr($_SERVER['PHP_SELF'],'product_reviews_info.php') or strstr($_SERVER['PHP_SELF'],'product_reviews.php') or strstr($PHP_SELF,'product_reviews_info.php') or strstr($PHP_SELF,'product_reviews.php') ):
   if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO=='' ) {
     if ( HTDA_PRODUCT_REVIEWS_INFO_ON=='1' ) {
       $the_desc= tep_get_header_tag_products_desc(isset($HTTP_GET_VARS['reviews_id'])) . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $the_desc= tep_get_header_tag_products_desc(isset($HTTP_GET_VARS['reviews_id']));
     }
   } else {
     $the_desc= HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO;
   }

   if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO=='' ) {

 

168 of the catalog/includes/header_tags.php reads as follows:

 

$the_desc= tep_get_header_tag_products_desc(isset($HTTP_GET_VARS['reviews_id'])) . ' ' . HEAD_DESC_TAG_ALL;

 

Any ideas why this is happening? What file should I be looking at to correct this... is it one of these files:

catalog/includes/header_tags.php

PRODUCTS_REVIEWS_INFO.PHP or PRODUCTS_REVIEWS.PHP

 

Please help.

 

Thanks

Eric B


AJ2000

Share this post


Link to post
Share on other sites

I just uploaded a new version that has an install file for the database changes. A lot of people were having trouble getting the db updated and, hopefully, this will make it easier. Just copy the database_setup.php file to your root directory. Then open a browser and display that file (http://www.yoursite.com/database_setup.php). That's it!

 

Jack

Share this post


Link to post
Share on other sites
I just uploaded a new version that has an install file for the database changes.  A lot of people were having trouble getting the db updated and, hopefully, this will make it easier.  Just copy the database_setup.php file to your root directory.  Then open a browser and display that file (http://www.yoursite.com/database_setup.php).  That's it!

 

Jack

 

Hi Jack,

 

I am a little confused.. was this response to my question just before it. If so I believe my database was updated fine uisng the .sql file that come with the contribution I downloaded a couple of months ago.

 

Please let me know if I should try using the file you just uploaded to correct the promblem

 

Thanks

Eric B


AJ2000

Share this post


Link to post
Share on other sites

No, it was just announcing a new version. I think your problem has been mentioned before here in the thread. I seem to recall a problem with the reviews section. Try going backwards through the pages. It should be less than 10 or so back.

 

Jack

Share this post


Link to post
Share on other sites

I got this installed and I thought it was working fine but recently I found several issues that I would really appreciate some help on.

 

1. When I am logged in and I click on the little arrow in SPECIALS I get

Fatal error: Call to undefined function: clean_html_comments() in /home/cjadmin/public_html/store/includes/header_tags.php on line 138.

If I click on the product it works fine.

 

2. When I am logged in and I click on the product in REVIEWS I get

Fatal error: Call to undefined function: tep_get_header_tag_products_desc() in /home/cjadmin/public_html/store/includes/header_tags.php on line 165.

If I click on the little arrow it works fine.

 

3. If I click on the the spanish flag I get

Warning: main(includes/languages/espanol/header_tags.php): failed to open stream: No such file or directory in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

Warning: main(includes/languages/espanol/header_tags.php): failed to open stream: No such file or directory in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

Fatal error: main(): Failed opening required 'includes/languages/espanol/header_tags.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

4. If I click on the german flag I get

Warning: main(includes/languages/german/header_tags.php): failed to open stream: No such file or directory in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

Warning: main(includes/languages/german/header_tags.php): failed to open stream: No such file or directory in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

Fatal error: main(): Failed opening required 'includes/languages/german/header_tags.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

The only contributions I have installed are #1 Header Tags, #2 Accept eChecks, and #3 HTTP_REFERER Referral 1.0

 

Here is the code of the /home/cjadmin/public_html/store/includes/header_tags.php file

 

<?php
// /catalog/includes/header_tags.php
// WebMakers.com Added: Header Tags Generator v2.3
// Add META TAGS and Modify TITLE
//
// NOTE: Globally replace all fields in products table with current product name just to get things started:
// In phpMyAdmin use: UPDATE products_description set PRODUCTS_HEAD_TITLE_TAG = PRODUCTS_NAME
//
require(DIR_WS_LANGUAGES . $language . '/' . 'header_tags.php');

echo '<!-- BOF: Generated Meta Tags -->' . "\n";

$the_desc='';
$the_key_words='';
$the_title='';

// Define specific settings per page:
switch (true) {

// INDEX.PHP
 case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) ):
   $the_category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
   $the_category = tep_db_fetch_array($the_category_query);

   $the_manufacturers_query= tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
   $the_manufacturers = tep_db_fetch_array($the_manufacturers_query);

   if (HTDA_DEFAULT_ON=='1') {
     $the_desc= HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL;
   } else {
     $the_desc= HEAD_DESC_TAG_DEFAULT;
   }

   if (HTKA_DEFAULT_ON=='1') {
     $the_key_words= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;
   } else {
     $the_key_words= HEAD_KEY_TAG_DEFAULT;
   }

   if (HTTA_DEFAULT_ON=='1') {
     $the_title= HEAD_TITLE_TAG_DEFAULT . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
   } else {
     $the_title= HEAD_TITLE_TAG_DEFAULT;
   }

   break;

// PRODUCT_INFO.PHP
 case ( strstr($_SERVER['PHP_SELF'],'product_info.php') or strstr($PHP_SELF,'product_info.php') ):
//    $the_product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'");
   $the_product_info_query = tep_db_query("select pd.language_id, p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'" . " and pd.language_id ='" .  (int)$languages_id . "'");
   $the_product_info = tep_db_fetch_array($the_product_info_query);

   if (empty($the_product_info['products_head_desc_tag'])) {
     $the_desc= HEAD_DESC_TAG_ALL;
   } else {
     if ( HTDA_PRODUCT_INFO_ON=='1' ) {
       $the_desc= $the_product_info['products_head_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $the_desc= $the_product_info['products_head_desc_tag'];
     }
   }

   if (empty($the_product_info['products_head_keywords_tag'])) {
     $the_key_words= HEAD_KEY_TAG_ALL;
   } else {
     if ( HTKA_PRODUCT_INFO_ON=='1' ) {
       $the_key_words= $the_product_info['products_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $the_key_words= $the_product_info['products_head_keywords_tag'];
     }
   }

   if (empty($the_product_info['products_head_title_tag'])) {
     $the_title= HEAD_TITLE_TAG_ALL;
   } else {
     if ( HTTA_PRODUCT_INFO_ON=='1' ) {
       $the_title= $the_product_info['products_head_title_tag'] . ' - ' . HEAD_TITLE_TAG_ALL;
     } else {
       $the_title= $the_product_info['products_head_title_tag'];
     }
   }

   break;

// PRODUCTS_NEW.PHP
 case ( strstr($_SERVER['PHP_SELF'],'products_new.php') or strstr($PHP_SELF,'products_new.php') ):
   if ( HEAD_DESC_TAG_WHATS_NEW!='' ) {
     if ( HTDA_WHATS_NEW_ON=='1' ) {
       $the_desc= HEAD_DESC_TAG_WHATS_NEW . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $the_desc= HEAD_DESC_TAG_WHATS_NEW;
     }
   } else {
     $the_desc= HEAD_DESC_TAG_ALL;
   }

   if ( HEAD_KEY_TAG_WHATS_NEW!='' ) {
     if ( HTKA_WHATS_NEW_ON=='1' ) {
       $the_key_words= HEAD_KEY_TAG_WHATS_NEW . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $the_key_words= HEAD_KEY_TAG_WHATS_NEW;
     }
   } else {
     $the_key_words= HEAD_KEY_TAG_ALL;
   }

   if ( HEAD_TITLE_TAG_WHATS_NEW!='' ) {
     if ( HTTA_WHATS_NEW_ON=='1' ) {
       $the_title= HEAD_TITLE_TAG_WHATS_NEW . ' - ' . HEAD_TITLE_TAG_ALL;
     } else {
       $the_title= HEAD_TITLE_TAG_WHATS_NEW;
     }
   } else {
     $the_title= HEAD_TITLE_TAG_ALL;
   }

   break;

// SPECIALS.PHP
 case ( strstr($_SERVER['PHP_SELF'],'specials.php')  or strstr($PHP_SELF,'specials.php') ):
   if ( HEAD_DESC_TAG_SPECIALS!='' ) {
     if ( HTDA_SPECIALS_ON=='1' ) {
       $the_desc= HEAD_DESC_TAG_SPECIALS . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $the_desc= HEAD_DESC_TAG_SPECIALS;
     }
   } else {
     $the_desc= HEAD_DESC_TAG_ALL;
   }

   if ( HEAD_KEY_TAG_SPECIALS=='' ) {
     // Build a list of ALL specials product names to put in keywords
     $new = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC ");
     $row = 0;
     $the_specials='';
     while ($new_values = tep_db_fetch_array($new)) {
       $the_specials .= clean_html_comments($new_values['products_name']) . ', ';
     }
     if ( HTKA_SPECIALS_ON=='1' ) {
       $the_key_words= $the_specials . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $the_key_words= $the_specials;
     }
   } else {
     $the_key_words= HEAD_KEY_TAG_SPECIALS . ' ' . HEAD_KEY_TAG_ALL;
   }

   if ( HEAD_TITLE_TAG_SPECIALS!='' ) {
     if ( HTTA_SPECIALS_ON=='1' ) {
       $the_title= HEAD_TITLE_TAG_SPECIALS . ' - ' . HEAD_TITLE_TAG_ALL;
     } else {
       $the_title= HEAD_TITLE_TAG_SPECIALS;
     }
   } else {
     $the_title= HEAD_TITLE_TAG_ALL;
   }

   break;

// PRODUCTS_REVIEWS_INFO.PHP and PRODUCTS_REVIEWS.PHP
 case ( strstr($_SERVER['PHP_SELF'],'product_reviews_info.php') or strstr($_SERVER['PHP_SELF'],'product_reviews.php') or strstr($PHP_SELF,'product_reviews_info.php') or strstr($PHP_SELF,'product_reviews.php') ):
   if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO=='' ) {
     if ( HTDA_PRODUCT_REVIEWS_INFO_ON=='1' ) {
       $the_desc= tep_get_header_tag_products_desc(isset($HTTP_GET_VARS['reviews_id'])) . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $the_desc= tep_get_header_tag_products_desc(isset($HTTP_GET_VARS['reviews_id']));
     }
   } else {
     $the_desc= HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO;
   }

   if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO=='' ) {
     if ( HTKA_PRODUCT_REVIEWS_INFO_ON=='1' ) {
       $the_key_words= tep_get_header_tag_products_keywords(isset($HTTP_GET_VARS['reviews_id'])) . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $the_key_words= tep_get_header_tag_products_keywords(isset($HTTP_GET_VARS['reviews_id']));
     }
   } else {
     $the_key_words= HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO;
   }

   if ( HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO=='' ) {
     if ( HTTA_PRODUCT_REVIEWS_INFO_ON=='1' ) {
       $the_title= tep_get_header_tag_products_title(isset($HTTP_GET_VARS['reviews_id'])) . ' - ' . HEAD_TITLE_TAG_ALL;
     } else {
       $the_title= tep_get_header_tag_products_title(isset($HTTP_GET_VARS['reviews_id']));
     }
   } else {
     $the_title= HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO;
   }

   break;

// ALL OTHER PAGES NOT DEFINED ABOVE
 default:
   $the_desc= HEAD_DESC_TAG_ALL;
   $the_key_words= HEAD_KEY_TAG_ALL;
   $the_title= HEAD_TITLE_TAG_ALL;
   break;

 }

echo '  <title>' . $the_title . '</title>' . "\n";
echo ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET  . '">'."\n";
echo '  <META NAME="Description" Content="' . $the_desc . '">' . "\n";
echo '  <META NAME="Keywords" CONTENT="' . $the_key_words . '">' . "\n";
echo '  <META NAME="Reply-to" CONTENT="' . HEAD_REPLY_TAG_ALL . '">' . "\n";
echo '  <META NAME="Robots" CONTENT="index,follow">' . "\n";

echo '<!-- EOF: Generated Meta Tags -->' . "\n";
?>

 

Please help, I've been looking at this for three days now and I've been reading this support section but I just can't get this figured out and I'm trying to get this set up for my wife.

 

Thanx, Dave.

Share this post


Link to post
Share on other sites

Do you have a header_tags.php file in the includes/languages/spanish and includes/languages/german directories?

 

Jack

Share this post


Link to post
Share on other sites

Then you need to put them there if you want to use those languages.

 

Jack

Share this post


Link to post
Share on other sites

Do I just copy the same file to those locations but with the appropriate text translations in the file? If so then that would take care of #3 & #4.

 

What about #1 & #2?

 

Thanx, Dave.

Share this post


Link to post
Share on other sites

Yes, just copy and edit.

 

The first two errors are most likely caused by a missing header_tags.php file in includes/functions.

 

Jack

Share this post


Link to post
Share on other sites
$the_desc= tep_get_header_tag_products_desc(isset($HTTP_GET_VARS['reviews_id'])) . ' ' . HEAD_DESC_TAG_ALL;

 

Any ideas why this is happening? What file should I be looking at to correct this...

 

I had the same issue. I fixed it, but I don't recall what file that routine (tep_get_header_tag_products_desc) is in. Here's how I did it though:

 

Do a search of the php files in your /includes directory for that phrase (tep_get_header_tag_products_desc).

 

When you find it, you'll also find that that line is commented out with a double slash (//).

 

Remove the //, save, upload. Works.

 

Now, why that line is commented out I have no idea. Especially since other parts of the code still refer to it. Uncommenting that line doesn't appear to have affected how the contrib acts in any other way.

 

This was the only way I could get my Reviews pages to work correctly.

Share this post


Link to post
Share on other sites
I got this installed and I thought it was working fine but recently I found several issues that I would really appreciate some help on.

 

1. When I am logged in and I click on the little arrow in SPECIALS I get

Fatal error: Call to undefined function: clean_html_comments() in /home/cjadmin/public_html/store/includes/header_tags.php on line 138.

If I click on the product it works fine.

 

2. When I am logged in and I click on the product in REVIEWS I get

Fatal error: Call to undefined function: tep_get_header_tag_products_desc() in /home/cjadmin/public_html/store/includes/header_tags.php on line 165.

If I click on the little arrow it works fine.

 

3. If I click on the the spanish flag I get

Warning: main(includes/languages/espanol/header_tags.php): failed to open stream: No such file or directory in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

Warning: main(includes/languages/espanol/header_tags.php): failed to open stream: No such file or directory in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

Fatal error: main(): Failed opening required 'includes/languages/espanol/header_tags.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

4. If I click on the german flag I get

Warning: main(includes/languages/german/header_tags.php): failed to open stream: No such file or directory in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

Warning: main(includes/languages/german/header_tags.php): failed to open stream: No such file or directory in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

Fatal error: main(): Failed opening required 'includes/languages/german/header_tags.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cjadmin/public_html/store/includes/header_tags.php on line 9

 

The only contributions I have installed are #1 Header Tags, #2 Accept eChecks, and #3 HTTP_REFERER Referral 1.0

 

Here is the code of the /home/cjadmin/public_html/store/includes/header_tags.php file

.......

.......

Please help, I've been looking at this for three days now and I've been reading this support section but I just can't get this figured out and I'm trying to get this set up for my wife.

 

Thanx, Dave.

 

Just to let everyone know, I found that the following code was missing/corrupt from my includes/application_top.php file.

 

// BOF: WebMakers.com Added: Header Tags Controller v1.0
//require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
 require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE
// EOF: WebMakers.com Added: Header Tags Controller v1.0

 

Everything is working great now. :thumbsup:

 

Thanx for the help.

 

Dave.

Share this post


Link to post
Share on other sites
No, it was just announcing a new version.  I think your problem has been mentioned before here in the thread.  I seem to recall a problem with the reviews section.  Try going backwards through the pages.  It should be less than 10 or so back.

 

Jack

 

Hi Jack,

 

I went back through the pages... people using STS were having problems with the reviews section. I am not using STS. Around page 18 of this thread they were discussing how

require(DIR_WS_FUNCTIONS . 'header_tags.php');

Gets declared twice and it had to be commented out. Could that be my problem even if I am not using STS

 

Everything is working fine with my install of HTC except for the review pages.

 

Could the file catalog/product_reviews.php be incorrect or something?

 

Here is part of the code from that file.. can this be the problem? Does the code look ok to you?

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v1.0
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v1.0
?>

 

Just to recap everything works fine except the reviews pages... here is the error I am getting

Fatal error: Call to undefined function: tep_get_header_tag_products_desc() in /home/htdocs/users/ebonni34/ebonni34/bonafideauthentics.com/catalog/includes/header_tags.php on line 168

 

Again the file header_tags.php is there it is not missing...

 

Please help

 

Thanks

Eric B


AJ2000

Share this post


Link to post
Share on other sites
The error is on this page

catalog/product_reviews.php

 

For now I have just removed the code for HTC from this file and replaced it with the original section of code

 

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>

 

The product_reviews.php page now works on the site but there I can't control the header tags.... hopefully someone can give me some clue as to what the problem is here.

 

Thanks

Eric B

 

PS I posted this just incase someone goes to look at my site and sees the page is working... the reason it works is because I removed the HTC code.. but I want to put it back in if I can get it working as I would like to have control over the keywords title and description on the reveiw pages.


AJ2000

Share this post


Link to post
Share on other sites

If header_tags.php is already included by application_top.php a second require would cause error messages. As far as I know this is always circumvented by using include_once or require_once when calling code that might already have been included...

 

require_once(DIR_WS_FUNCTIONS . 'header_tags.php');

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
Sign in to follow this  

×