Jump to content
kymation

[Addon} Modular SEO Header Tags

Recommended Posts

I need help, please. I'm a newbie at all this so please be patient with me.

 

I installed osCommerce version v2.3.1 2 days ago and just installed Modular SEO Header Tags 1.4.2. I went to login and this came up.

 

// Start Modular SEO header Tags define( 'MODULE_HEADER_TAGS_PRODUCT_TITLE_INSERT_TITLE', 'Products Head Title:' ); define( 'MODULE_HEADER_TAGS_PRODUCT_DESCRIPTION_INSERT_TITLE', 'Products Meta Description:' ); define( 'MODULE_HEADER_TAGS_EDIT_CATEGORIES_TITLE', 'Category Head Title:' ); define( 'MODULE_HEADER_TAGS_EDIT_CATEGORIES_DESCRIPTION', 'Category Meta Description:' ); // End Modular SEO header Tags ?>

Warning: Cannot modify header information - headers already sent by (output started at /home/pttam/public_html/admin/includes/languages/english.php:304) in /home/pttam/public_html/admin/includes/functions/general.php on line 34

 

What do I do to fix it?

 

I have added the YMM 2.3.1 Module too before the SEO Header Tags Module. I even compared the files and there is no difference between the new installation general.php and my current general.php.

 

Any ideas?

Share this post


Link to post
Share on other sites

You have two separate errors there. The first error is a language file named ht_product_title_insert.php. It belongs in includes/languages/english/modules/header_tags/ (that's on the catalog side.) It appears that you put that file somewhere other than the place it's supposed to be. That needs to be moved to the correct location or deleted and a new one uploaded.

 

The second error is complaining about admin/includes/languages/english.php on line 304. The normal file ends at line 299, so this would be something that you added. This Addon doesn't add anything to that file, so it some other Addon causing the problem. It's possible that it is your editor causing this problem by inserting characters after the ?> at the end of that file. Try deleting anything after the last ?> and see if that helps.

 

You may need to use a different editor to make this work. These files must be edited with a true text editor such as Notepad++. Don't try to use a word processor or an online editor.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi,

 

i have a problem with "Category Meta Description - Insert " or " Category Title - Insert New " in admin

 

I put my data in box category meta description, it's ok but if i want edit after, the box is empty.

 

i have check database, and data is ok.

 

i have a problem only when i want edit.

 

it's a bug ?

 

any ideas ?

Share this post


Link to post
Share on other sites

Yes, it's a bug. I'll take a look at it as soon as I have a chance. Thanks for reporting this.

 

regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Bug fix: In admin/includes/modules/header_tags/categories_insert.php, find $category_id and replace with $cInfo->categories_id (two places.)

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Bug fix: In admin/includes/modules/header_tags/categories_insert.php, find $category_id and replace with $cInfo->categories_id (two places.)

 

Regards

Jim

 

 

THANK YOU !! I was looking for this fix, I read through the whole topic before posting and there it is!

 

Can you provide a screen shot of your header tags setup?, I want to make sure I clean mine up :)

Share this post


Link to post
Share on other sites

Hi I have the Product Title-Insert New and Product Meta Description modules enabled. But when i input the title and look for the description on my view source i get nothing and the title isn't showing. I did edit the title previously in my template_top.php file where there was this:

 

<title><?= tep_output_string_protected($oscTemplate->getTitle()); ?></title>, and the changes did show up.

 

Would i need to edit this code in order for my title to appear?

Share this post


Link to post
Share on other sites

The code in template_top.php needs to be the stock osCommerce code for this to work. Yours has been modified, so you need to replace it with the stock code. You also need to add titles and descriptions in your Admin in order to have something show up.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

You can download the code here.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

nice, thanks jim, i downloaded it. but i'm having the hardest time finding it anywhere--have looked in header, application-top, index.php..would you happen to know where it is? sorry, i'm a bit of a newbie to OS. Thanks!

Share this post


Link to post
Share on other sites

catalog/includes/application_top.php. Compare the stock copy to yours, or just replace yours with the stock copy.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

ok, the title was a bit off so i changed to this:

 

<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>

 

But still nothing....

Share this post


Link to post
Share on other sites

Did you add a title for that product/category?

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

yep i have enabled the module - Product Title - Insert New

 

and so i assume under the product it's the field, "Products Head Title:"

 

I have added text and nothing there.

Share this post


Link to post
Share on other sites

Look at that product in the products_description table of your database. Does that text appear in the head_title field?

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

yep head_title and head_description are there. here's my template_top code..does this help?

<?php
/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com Insider

 Copyright (c) 2010 osCommerce

 Released under the GNU General Public License
*/

 $oscTemplate->buildBlocks();

 if (!$oscTemplate->hasBlocks('boxes_column_left')) {
   $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
 }

 if (!$oscTemplate->hasBlocks('boxes_column_right')) {
   $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
 }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?= HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />


<title>Travel Deals in a Flash - <?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>


<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />



<link rel="index" title="<?= (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER).DIR_WS_CATALOG; ?>" href="<?= (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER).DIR_WS_CATALOG; ?>" />
<link rel="shortcut icon" href="images/favicon.ico" />
<script type="text/javascript" src="ext/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script>
<script type="text/javascript" src="ext/jquery/jquery.countdown.min.js"></script>
<? if ($request_type == 'NONSSL') { ?>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<? } ?>
<script type="text/javascript" src="ext/jquery/jquery.gomap-1.3.0.min.js"></script>
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="ext/jquery/fancybox/jquery.easing-1.3.pack.js"></script>
<script type="text/javascript" src="ext/jquery/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<?= $oscTemplate->getBlocks('header_tags'); ?>
<?
if (!isset($lng) || (isset($lng) && !is_object($lng))) {include_once(DIR_WS_CLASSES . 'language.php');$lng = new language;}reset($lng->catalog_languages);while (list($key, $value) = each($lng->catalog_languages)) {
?>
<link rel="alternate" type="application/rss+xml" title="<?php echo STORE_NAME . ' - ' . BOX_INFORMATION_RSS; ?>" href="<?php echo FILENAME_RSS, '/language/'.$key.((isset($_GET['cPath']))?'/cPath/'.$_GET['cPath']:'').((isset($_GET['manufacturers_id']))?'/manufacturers_id/'.$_GET['manufacturers_id']:''); ?>">
<? } ?>
<script type="text/javascript">
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-10171695-5']);
 _gaq.push(['_trackPageview']);
 (function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 })();
</script>
<meta name="google-site-verification" content="1xWryvOv88H2LQZYQ-t9WVyNeJ_0Na22yYNrw_HD6TU" />
</head>
<body>
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

Share this post


Link to post
Share on other sites

The module should show the title for any valid product. The text is in the database so it should show up. Do you have the Products Status: set to In Stock?

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I admit I'm puzzled. The module code is a fundamental part of osCommerce 2.3.1. It should just work. Sorry, I'm out of guesses.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

The odd thing is that the Category module is working, as the category is showing in the Title. Uggh.. this is frustrating. Have no idea what's going on. Anyone else having this issue?

Share this post


Link to post
Share on other sites

Hi I installed your module and when I installed the "All Pages Title - String" mdoule I got the following error: Fatal error: Cannot redeclare class language in /home/content/26/7698926/html/catalog/includes/classes/language.php on line 16. If I set the status to false the error is not there. Any suggestions to fix this error?

Share this post


Link to post
Share on other sites

Read back through this thread. This has been reported by several people. I can't see the problem so I'm unable to come up with a permanent fix.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi I was looking at the error which I got and noticed the following. Each module where you have to input some info gives the: "Fatal error: Cannot redeclare class language in /home/content/26/7698926/html/catalog/includes/classes/language.php on line 16" i.e. All Pages Title - String, Category Title, Front Page - Description, Front Page - Title, Front Page - Store Name in Title, Other Pages Title - String,Product Title - String modules. What I also noticed is that a particular module( I can't remember right now) had the following words in the description "Illyricum cunctamque Graeciam tueatur" which is latin. When I looked at my language.php file located in the classes directory I noticed It didn't have latin any where in the languages array. Could this be one of the problems which would cause the error because once the module installs it installs with the above description? I'm just throwing this out to see if this can lead to a solution.

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

×