Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

All the other pages seem to work...Just the index doesnot show.

Yes I put it back in and I reverted to my backup copy of the english file.

I thought it might undo what ever I screwed up in admin.

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

The index page is the only page that uses that code. The categories_htc fields were added in the last release of Header Tags. So it appears that your database has not been updated to use the new fields. There is an update sql file in the contribution but it may not be correct. i have a new version that is correct but has not been uploaded. Try uploading the following database changes:

ALTER TABLE categories_description ADD categories_htc_title_tag VARCHAR(80) NULL;
ALTER TABLE categories_description ADD categories_htc_desc_tag LONGTEXT NULL;
ALTER TABLE categories_description ADD categories_htc_keywords_tag LONGTEXT NULL;
ALTER TABLE categories_description ADD categories_htc_description LONGTEXT NULL;

 

Jack

Share this post


Link to post
Share on other sites

Thanks, that seems to have fixed the index page it loads correctly now.

What did I do wrong? Now I am afraid to edit the header tags in admin.

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

My guess is that you uploaded the files from a new version of Header Tags and didn't realize the database file had been changed. If that is what it was, then you shouldn't have a problem with using it now. But I would suggest you backup your files just to be safe.

 

Jack

Share this post


Link to post
Share on other sites

Jack,

I have the other pages such as contact us and shipping, etc. defined in admin. But now when I view them on the site they use the defined default heading. Why would this happen?

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

I don't know. Header Tags is working as it should. You may need to ask on the support thread for that contribution to fnd the answer to that problem.

 

Jack

Share this post


Link to post
Share on other sites

Jack,

What's the other contribution?

I think you misunderstood me. I mean that I have the header tags defined in the admin for the contact us, shipping and such. Through header tags>text control. But when I view the pages online they donot use the defined header tags>text control anymore. They use the Default Title, Default Descriptions and Default Keywords....

 

Thanks,

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

Thanks for the great contribution. I have it installed, and it appears to be working properly. I don't know if I missed something, but I don't quite understand how I'm to use the Header Tag Controller pages in the admin. Are instructions/explanations somewhere I missed? The "new page" box, is that for entering the name of a file in the catalog that I want meta tags added to also?

Share this post


Link to post
Share on other sites
Jack,

What's the other contribution?

I think you misunderstood me. I mean that I have the header tags defined in the admin for the contact us, shipping and such. Through header tags>text control. But when I view the pages online they donot use the defined header tags>text control anymore. They use the Default Title, Default Descriptions and Default Keywords....

 

Thanks,

Moon

Yes, you are correct. I did misunderstand you. I thought you were saying you used the Define Main page contribution. As for the problem you are having, doublecheck the contact us page to make sure the code for header tags is still in it (n the <head> section). Also take a look at the includes/header_tags.php and english/header_tags.php files and make sure there is a contact us section in both of those. Do the same for the other pages you are having problems with. There's nothing to stop those pages from displaying the title if the code is in place so I have to think that it is not for some reason.

 

Jack

Share this post


Link to post
Share on other sites
Thanks for the great contribution.  I have it installed, and it appears to be working properly.  I don't know if I missed something, but I don't quite understand how I'm to use the Header Tag Controller pages in the admin.  Are instructions/explanations somewhere I missed?  The "new page" box, is that for entering the name of a file in the catalog that I want meta tags added to also?

I agree the instructions are poor. I'm working on them but it is a slow process. The section in admin can be a little confusing due to it use of the word page. If you have a file in your shop, let's say privacy.php, that you want to have a title and meta tags added to, then you use the add page to do that. It doesn't really add a page, just the code in the header tags files that is used to display the title and meta tags. Once the code in those files exist, you can use the other tools in admin->Header Tags to edit them.

 

Jack

Share this post


Link to post
Share on other sites
Yes, you are correct. I did misunderstand you. I thought you were saying you used the Define Main page contribution. As for the problem you are having, doublecheck the contact us page to make sure the code for header tags is still in it (n the <head> section). Also take a look at the includes/header_tags.php and english/header_tags.php files and make sure there is a contact us section in both of those. Do the same for the other pages you are having problems with. There's nothing to stop those pages from displaying the title if the code is in place so I have to think that it is not for some reason.

 

Jack

 

 

Ok Thanks for that!

I was missing the info in the included/header_tag file.

 

Now, I have also figured out where that earlier problem came from, the one where all the header tag info was appearing above my page when I viewed the site. It just happened to me again. I get it when I use Delete a New Page in Admin>header tags>page control. I just deleted a page and my site broke to pieces again. For some reason that function is screwy. Do you have any ideas?

 

Thanks,

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

Copy and paste this code over your admin/header_tags_controller.php file. It contains some fixes that have not be uploaded yet. Maybe it wil fix your problem.

 

<?php
/*
 $Id: header_tags_controller.php,v 1.2 2004/08/07 22:50:52 hpdl Exp $
 header_tags_controller Originally Created by: Jack York
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 require('includes/functions/header_tags.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_HEADER_TAGS_CONTROLLER);
 
 $filenameInc = '../includes/header_tags.php';
 $filenameEng = '../' . DIR_WS_LANGUAGES . $language . '/header_tags.php';
 $action       = (isset($HTTP_POST_VARS['action']) ? $HTTP_POST_VARS['action'] : '');
 $actionDelete = (isset($HTTP_POST_VARS['action_delete']) ? $HTTP_POST_VARS['action_delete'] : '');
 $actionCheck  = (isset($HTTP_POST_VARS['action_check']) ? $HTTP_POST_VARS['action_check'] : '');
 
 if (tep_not_null($action)) 
 {
   $args = array();
   $args['page'] = $_POST['page'];
   $args['title'] = $_POST['title'];
   $args['desc'] = addslashes($_POST['desc']);
   $args['keyword'] = addslashes($_POST['keyword']);
   $args['htta'] = ($_POST['htta'] == 'on') ? 1 : 0;
   $args['htda'] = ($_POST['htda'] == 'on') ? 1 : 0;
   $args['htka'] = ($_POST['htka'] == 'on') ? 1 : 0;
   $args['htca'] = ($_POST['htca'] == 'on') ? 1 : 0;    
   
   if (($pos = strpos($args['page'], ".php")) !== FALSE)  //remove .php from page 
      $args['page'] = substr($args['page'], 0, $pos);     //if present
  
   $fp = file($filenameEng);  
   $checkOnce = true;
   $lastSection = '';
   $insertPoint = 0;
   $markPoint = count($fp) - 1; 
   
   if (NotDuplicatePage($fp, $args['page']))
   {
     /*********************** ENGLISH SECTION ************************/
     for ($idx = 0; $idx < count($fp); ++$idx)  //find where to insert the new page
     {     
        if ($checkOnce && strpos($fp[$idx], "// DEFINE TAGS FOR INDIVIDUAL PAGES") === FALSE)
           continue;
        
        $checkOnce = false;   
        $section = GetSectionName($fp[$idx]);   
        
        if (! empty($section))
        {
           if (strcasecmp($section, $args['page']) < 0)
           {         
              $lastSection = $section;    
              $markPoint = $idx;       
           }   
           else if (strcasecmp($section, $args['page']) > 0)
           {
              if ($insertPoint == 0)
                $insertPoint = $idx;
           }      
        }
     }
     
     if ($insertPoint != count($fp))              //backup one line for appearance
       $insertPoint--;
        
     $fileUpper = strtoupper($args['page']);      //prepare the english array
     $engArray = array();
     $engArray['page'] = sprintf("// %s.php\n", $args['page']);  
     $engArray['htta'] = sprintf("define('HTTA_%s_ON','%d');\n", $fileUpper, $args['htta']);
     $engArray['htda'] = sprintf("define('HTDA_%s_ON','%d');\n", $fileUpper, $args['htda']);
     $engArray['htka'] = sprintf("define('HTKA_%s_ON','%d');\n", $fileUpper, $args['htka']);
     $engArray['title'] = sprintf("define('HEAD_TITLE_TAG_%s','%s');\n", $fileUpper, $args['page']);
     $engArray['desc'] = sprintf("define('HEAD_DESC_TAG_%s','%s');\n", $fileUpper, $args['desc']);
     $engArray['keyword'] = sprintf("define('HEAD_KEY_TAG_%s','%s');\n", $fileUpper, $args['keyword']);
              
     array_splice($fp, $insertPoint, 0, $engArray);  
     WriteHeaderTagsFile($filenameEng, $fp);   
          
     /*********************** INCLUDES SECTION ************************/     
     $fp = file($filenameInc); 
     $checkOnce = true;
     $insertPoint = 0;
     $markPoint = count($fp) - 1;
     
     for ($idx = 0; $idx < count($fp); ++$idx)  //find where to insert the new page
     {     
        if ($checkOnce && strpos($fp[$idx], "switch (true)") === FALSE)
           continue;
        $checkOnce = false;   
        $section = GetSectionName($fp[$idx]);   
        if (! empty($section))
        {
           if (strcasecmp($section, $args['page']) < 0)
           {         
              $lastSection = $section;    
              $markPoint = $idx;       
           }   
           else if (strcasecmp($section, $args['page']) > 0)
           {
              if ($insertPoint == 0)
                $insertPoint = $idx;
           }      
        }
     }
     
     if ($insertPoint != count($fp))              //backup one line for appearance
       $insertPoint--;  
     
     $incArray = array();
     $fileUpper = strtoupper($args['page']);
     $spaces = 10;
     $incArray['page'] = sprintf("\n// %s.php\n", $args['page']);  
     $incArray['case'] = sprintf("  case (strstr(\$_SERVER['PHP_SELF'],FILENAME_%s) or strstr(\$PHP_SELF, FILENAME_%s));\n",$fileUpper, $fileUpper);
     $incArray['line'] = sprintf("    \$tags_array = tep_header_tag_page(HTTA_%s_ON, HEAD_TITLE_TAG_%s, \n%38sHTDA_%s_ON, HEAD_DESC_TAG_%s, \n%38sHTKA_%s_ON, HEAD_KEY_TAG_%s );\n   break;\n",$fileUpper, $fileUpper, " ", $fileUpper, $fileUpper, " ", $fileUpper, $fileUpper );  
  
     array_splice($fp, $insertPoint, 0, $incArray);  
     WriteHeaderTagsFile($filenameInc, $fp);  
   } 
   else
   {
      $error = 'Page name is already entered -> ' .$args['page'];
      $messageStack->add($error);
   }
 } 
 else if (tep_not_null($actionDelete))
 {
    /******************** Delete the English entries ********************/
    $page_to_delete = $_POST['delete_page'].'.php';
    $fp = file($filenameEng);
    $found = false; 
    $delStart = 0;
    $delStop = 1;
    for ($idx = 0; $idx < count($fp); ++$idx)
    {
       if (! $found && strpos($fp[$idx], $page_to_delete) !== FALSE)
       {
           $delStart = $idx; // + 1;  //adjust for 0 start
           $found = true;
       }
       else if ($found && (tep_not_null($fp[$idx]) && strpos($fp[$idx], ".php") === FALSE))
           $delStop++;
       else if ($found && (! tep_not_null($fp[$idx]) || strpos($fp[$idx], ".php") !== FALSE))
           break;
    }
    array_splice($fp, $delStart, $delStop);
    WriteHeaderTagsFile($filenameEng, $fp); 
    
    /******************** Delete the includes entries *******************/
    $fp = file($filenameInc);
    $checkOnce = true;
    $found = false; 
    $delStart = 0;
    $delStop = 1;
    
    for ($idx = 0; $idx < count($fp); ++$idx)
    {
       if ($checkOnce && strpos($fp[$idx], "switch") === FALSE)
          continue;
       
       $checkOnce = false;
       if (! $found && (strpos($fp[$idx], $page_to_delete) !== FALSE || strpos($fp[$idx], strtoupper($page_to_delete))) !== FALSE)
       {
           $delStart = $idx; // + 1;  //adjust for 0 start
           $found = true;
       }
       else if ($found && ( strpos($fp[$idx], "ALL OTHER PAGES NOT DEFINED ABOVE") === FALSE))
          $delStop++;
       else if ($found && (strpos($fp[$idx], "ALL OTHER PAGES NOT DEFINED ABOVE") !== FALSE))
           break;            
    }
    array_splice($fp, $delStart, $delStop);
    WriteHeaderTagsFile($filenameInc, $fp); 
 }
 else if (tep_not_null($actionCheck)) 
 {
    $filelist = array();
    $newfiles = array();
    $fp = file($filenameEng);
 
    for ($idx = 0; $idx < count($fp); ++$idx) 
    {
       $section = GetSectionName($fp[$idx]);
       if (empty($section) || strpos($section, "header_tags") !== FALSE || strpos($section, "WebMakers") !== FALSE)
          continue;
       $section .= '.php';
       $section = str_replace("-", "_", $section);  //ensure the scoring is the same
       $filelist[] = $section;
    }

    if ($handle = opendir('../')) 
    {
       $fp = file($filenameEng); 
       $found = false;
       while (false !== ($file = readdir($handle))) 
       { 
          if (strpos($file, '.php') === FALSE)
             continue;       

          if (FileNotUsingHeaderTags($file))
          {
             foreach($filelist as $name) 
             {           
                $tmp_file = str_replace("-", "_", $file);  //ensure the scoring is the same
                if (strcasecmp($name, $tmp_file) === 0)
                {
                   $found = true;
                   break;
                }
             }   
             if (! $found)
                $newfiles[] = array('id' => $file, 'text' => $file);
             else
                $found = false;
          }
       }
       closedir($handle); 
    }
 }
 
 $deleteArray = array();
 $fp = file($filenameEng);
 $checkOnce = true;
 for ($idx = 0; $idx < count($fp); ++$idx)
 {
    if ($checkOnce && strpos($fp[$idx], "// DEFINE TAGS FOR INDIVIDUAL PAGES") === FALSE)
       continue;
    $checkOnce = false;
    $l = GetSectionName($fp[$idx]);
    if (tep_not_null($l))
      $deleteArray[] = array('id' => $l, 'text' => $l);
 }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
     <td class="pageHeading"><?php echo HEADING_TITLE_CONTROLLER; ?></td>
    </tr>
    <tr>
     <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>

    <!-- Begin of Header Tags - Add a Page -->
    <tr>
     <td><?php echo tep_black_line(); ?></td>
    </tr>
    <tr>
     <td class="main"><?php echo TEXT_INFORMATION_ADD_PAGE; ?></td>
    </tr>
    
    <tr>
     <td align="right"><?php echo tep_draw_form('header_tags', FILENAME_HEADER_TAGS_CONTROLLER, '', 'post') . tep_draw_hidden_field('action', 'process'); ?></td>
      <tr>
       <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    
        <tr>
         <td><table border="0" width="100%">
          <tr>
           <td class="smallText" width="10%" style="font-weight: bold;">Page Name</td>
           <td class="smallText" ><?php echo tep_draw_input_field('page', tep_not_null($page) ? $page : '', 'maxlength="255", size="30"', false); ?> </td>
          <tr>             
         </table></td>
        </tr>
        
        <tr>
         <td><table border="0" width="100%">
          <tr>
           <td class="smallText" width="13%" style="font-weight: bold;">Switches:</td>
           <td class="smallText">HTTA: </td>
           <td align="left"><?php echo tep_draw_checkbox_field('htta', '', FALSE, ''); ?> </td>
           <td class="smallText">HTDA: </td>
           <td ><?php echo tep_draw_checkbox_field('htda', '', FALSE, ''); ?> </td>
           <td class="smallText">HTKA: </td>
           <td ><?php echo tep_draw_checkbox_field('htka', '', FALSE, ''); ?> </td>
           <td class="smallText">HTCA: </td>
           <td ><?php echo tep_draw_checkbox_field('htca', '', FALSE, ''); ?> </td>
           <td width="50%"> </td>
          </tr>
         </table></td>
        </tr>
        
        <tr>
         <td><table border="0" width="100%">
          <tr>
           <td class="smallText" width="10%" style="font-weight: bold;">Title</td>
           <td class="smallText" ><?php echo tep_draw_input_field('title', tep_not_null($title) ? $title : '', 'maxlength="255", size="60"', false); ?> </td>
          <tr> 
          <tr>
           <td class="smallText" style="font-weight: bold;">Descriptions</td>
           <td class="smallText" ><?php echo tep_draw_input_field('desc', tep_not_null($desc) ? $desc : '', 'maxlength="255", size="60"', false); ?> </td>
          <tr> 
          <tr>
           <td class="smallText" style="font-weight: bold;">Keyword(s)</td>
           <td class="smallText" ><?php echo tep_draw_input_field('keyword', tep_not_null($key) ? $key : '', 'maxlength="255", size="60"', false); ?> </td>
          <tr>
         </table></td>
        </tr>
        
      <tr> 
       <td align="center"><?php echo (tep_image_submit('button_update.gif', IMAGE_UPDATE) ) . ' <a href="' . tep_href_link(FILENAME_HEADER_TAGS_CONTROLLER, '') .'">' . '</a>'; ?></td>
      </tr>
      
      <tr>
       <td><?php echo tep_black_line(); ?></td>
      </tr>
      
     </form>
     </td>
    </tr>
    <!-- end of Header Tags - Add a Page-->
     
    <!-- Begin of Header Tags - Delete a Page -->
    <tr>
     <td><?php echo tep_black_line(); ?></td>
    </tr>
    <tr>
     <td class="main"><?php echo TEXT_INFORMATION_DELETE_PAGE; ?></td>
    </tr>     
    <tr>
     <td align="right"><?php echo tep_draw_form('header_tags_delete', FILENAME_HEADER_TAGS_CONTROLLER, '', 'post') . tep_draw_hidden_field('action_delete', 'process'); ?></td>
      <tr>
       <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
         <td><table border="0" width="100%">
          <tr>
           <td class="smallText" width="10%" style="font-weight: bold;">Page Name</td>
           <td align="left"><?php   echo tep_draw_pull_down_menu('delete_page', $deleteArray, '', '', false);?></td>
          <tr>             
         </table></td>
        </tr>        
      <tr> 
       <td align="center"><?php echo (tep_image_submit('button_update.gif', IMAGE_UPDATE) ) . ' <a href="' . tep_href_link(FILENAME_HEADER_TAGS_CONTROLLER, '') .'">' . '</a>'; ?></td>
      </tr>       
      <tr>
       <td><?php echo tep_black_line(); ?></td>
      </tr>      
     </form>
     </td>
    </tr>
    <!-- end of Header Tags - Delete a Page-->  
    
    <!-- Begin of Header Tags - Auto Add Pages -->
    <tr>
     <td><?php echo tep_black_line(); ?></td>
    </tr>
    <tr>
     <td class="main"><?php echo TEXT_INFORMATION_CHECK_PAGES; ?></td>
    </tr>     
    <tr>
     <td align="right"><?php echo tep_draw_form('header_tags_auto', FILENAME_HEADER_TAGS_CONTROLLER, '', 'post') . tep_draw_hidden_field('action_check', 'process'); ?></td>
      <tr>
       <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
       <tr>
         <td><table border="0" width="100%">
          <tr>
           <td class="smallText" width="10%" style="font-weight: bold;">Page Name</td>
           <td align="left"><?php   echo tep_draw_pull_down_menu('new_files', $newfiles, '', '', false);?></td>
          <tr>             
         </table></td>
        </tr>            
      <tr> 
       <td align="center"><?php echo (tep_image_submit('button_update.gif', IMAGE_UPDATE) ) . ' <a href="' . tep_href_link(FILENAME_HEADER_TAGS_CONTROLLER, '') .'">' . '</a>'; ?></td>
      </tr>       
      <tr>
       <td><?php echo tep_black_line(); ?></td>
      </tr>      
     </form>
     </td>
    </tr>
    <!-- end of Header Tags - Auto Add Pages-->  
 
   </table></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Jack

Share this post


Link to post
Share on other sites

I just did a fresh OSC install along with this contribution and was following allong on this thread. When I saw the problem moonbeam was having, I decided to try what he had done and deleted a page using admin.

 

I got exactly the same problem, so I am also trying your suggestions.

 

I installed the new admin script and I am getting this error message when trying to access header on the admin page:

 

Parse error: parse error, unexpected T_IF in /usr/www/users/*****/*****/admin/header_tags_controller.php on line 231

 

Anyone else have this problem when deleting a page?

Share this post


Link to post
Share on other sites

I just fixed my problem and hopefully it will fix moonbeams.

 

Jack had suggested:

 

Check your english/headerTags.php file and make sure it starts with <?php and ends with ?>. Someone else contacted me about such a problem and that's what it was. If that is what it is in your case and you can let me know what you did before it failed, I can try to find the reason.

 

Jack

 

Also check your includes/header_tags.php file. Thre is a missing <?php tag at the top of the file.

 

I went back to the old version of admin/header_tags_controller.php and it looks like everything is back to normal.

Share this post


Link to post
Share on other sites

I checked all the header tag files for the missing <?php tag. They are in place.

 

Jack,

I replaced the header_tags_controller file as you posted...It didn't seem to help.

I still get the problem when I try to delete a page...

Thanks for everyones help.

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

Can you tell me exactly what steps you are taking, including the page name. I have not been able to reproduce the problem.

 

Jack

Share this post


Link to post
Share on other sites

Sure I will try,

First I add a new page faq.php only for testing purposes to delete

In Admin>page control>delete a new page I choose faq.php and hit update. Then I check the catalog online and find all the weird code on the pages...all of them.

Jack this happens on any page I try to remove. I also noticed when I try to add a new page the new listing in Admin>text control. The new listing robs information from other listings. When I look at the source code here is an example of links and print catalog. I just added print catalog and it stole the keywords tag from links:

// links.php

define('HTTA_LINKS_ON','0');

define('HTDA_LINKS_ON','0');

define('HTKA_LINKS_ON','0');

define('HEAD_TITLE_TAG_LINKS','Good Time Novelties: Our Favorite Web Links');

define('HEAD_DESC_TAG_LINKS','Source for great web links to other great web sites');

// print_catalog.php

define('HTTA_PRINT_CATALOG_ON','0');

define('HTDA_PRINT_CATALOG_ON','0');

define('HTKA_PRINT_CATALOG_ON','0');

define('HEAD_TITLE_TAG_PRINT_CATALOG','Good Time Novelties: Print our online Catalog');

define('HEAD_DESC_TAG_PRINT_CATALOG','Printable version of Good Time Novelties online catalog.');

define('HEAD_KEY_TAG_PRINT_CATALOG','Good Time Novelties,web links,good,time,novelty');

define('HEAD_KEY_TAG_LINKS','Good Time Novelties,web links,good,time,novelty');[code]


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

Hello,

 

I get this error message when adding/editing product:

 

Meta Tag Information

Products Page Title:

English 1054 - Unknown column 'products_head_title_tag' in 'field list'

 

select products_head_title_tag from products_description where products_id = '0' and language_id = '1'

 

[TEP STOP]

 

 

If you can tell me which page this error is from I can paste the code or sections of the code so you can help me. Or if you know what is wrong, please help me fix it. Thank you. :D

Share this post


Link to post
Share on other sites

My database is showing the products_head_title_tag field and its set to this:

 

Field: Type: Null: Default:

products_head_title_tag varchar(80) Yes NULL

 

So I am not sure why its saying "1054 - Unknown column 'products_head_title_tag' in 'field list'"

 

because it is there...hmmm ?? :huh:

Edited by caspire

Share this post


Link to post
Share on other sites
Sure I will try,

First I add a new page faq.php only for testing purposes to delete

In Admin>page control>delete a new page I choose faq.php and hit update. Then I check the catalog online and find all the weird code on the pages...all of them.

Jack this happens on any page I try to remove. I also noticed when I try to add a new page the new listing in Admin>text control. The new listing robs information from other listings. When I look at the source code here is an example of links and print catalog. I just added print catalog and it stole the keywords tag from links:

// links.php

define('HTTA_LINKS_ON','0');

define('HTDA_LINKS_ON','0');

define('HTKA_LINKS_ON','0');

define('HEAD_TITLE_TAG_LINKS','Good Time Novelties: Our Favorite Web Links');

define('HEAD_DESC_TAG_LINKS','Source for great web links to other great web sites');

// print_catalog.php

define('HTTA_PRINT_CATALOG_ON','0');

define('HTDA_PRINT_CATALOG_ON','0');

define('HTKA_PRINT_CATALOG_ON','0');

define('HEAD_TITLE_TAG_PRINT_CATALOG','Good Time Novelties: Print our online Catalog');

define('HEAD_DESC_TAG_PRINT_CATALOG','Printable version of Good Time Novelties online catalog.');

define('HEAD_KEY_TAG_PRINT_CATALOG','Good Time Novelties,web links,good,time,novelty');

define('HEAD_KEY_TAG_LINKS','Good Time Novelties,web links,good,time,novelty');[code]

[right][post=672146]<{POST_SNAPBACK}>[/post][/right]

I tried what you did, as well as a bunch of variations of it, but cannot get it to fail. Just to be sure we are both using the same code, I've uploaded a new version. You can just copy all of the files in the catalog directory (assuming you have the last version installed). That will bring you to the same version I am using. If the problem still persits, at least we know it is not the files.

 

Jack

Share this post


Link to post
Share on other sites
Hello,

 

I get this error message when adding/editing product:

 

Meta Tag Information

Products Page Title: 

English  1054 - Unknown column 'products_head_title_tag' in 'field list'

 

select products_head_title_tag from products_description where products_id = '0' and language_id = '1'

 

[TEP STOP]

If you can tell me which page this error is from I can paste the code or sections of the code so you can help me. Or if you know what is wrong, please help me fix it. Thank you.  :D

That error is most likely being generated in the admin/categories.php file. But instead of uploading it here, first try replacing your file with the one in the contribution. If the error goes away, then you have a problem in your installation. Note that if you have made other changes to that file, then you cannot run with this file but it can be used for testing.

 

Jack

Share this post


Link to post
Share on other sites

Ok, i uploaded your categories.php from the "catalog_for_new_shop_only" directory and then reloaded the page...and I still get the same error.

 

Any other suggestions? hehe thanks! :)

Share this post


Link to post
Share on other sites
The index page is the only page that uses that code. The categories_htc fields were added in the last release of Header Tags. So it appears that your database has not been updated to use the new fields. There is an update sql file in the contribution but it may not be correct. i have a new version that is correct but has not been uploaded.  Try uploading the following database changes:
ALTER TABLE categories_description ADD categories_htc_title_tag VARCHAR(80) NULL;
ALTER TABLE categories_description ADD categories_htc_desc_tag LONGTEXT NULL;
ALTER TABLE categories_description ADD categories_htc_keywords_tag LONGTEXT NULL;
ALTER TABLE categories_description ADD categories_htc_description LONGTEXT NULL;

 

Jack

 

 

I ran this on my database becuase I saw that you posted it on the last page...not sure if this could generate the error message that I am getting.

Share this post


Link to post
Share on other sites

No that wouldn't cause your problem. But if you ran that and it went OK then that indicates you have an older version of the contribution. Do you know what version you are using?

 

Jack

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  

×