Guest Posted March 12, 2011 Posted March 12, 2011 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? Quote
♥kymation Posted March 12, 2011 Author Posted March 12, 2011 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 Quote See my profile for a list of my addons and ways to get support.
ntls2000 Posted March 19, 2011 Posted March 19, 2011 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 ? Quote
♥kymation Posted March 19, 2011 Author Posted March 19, 2011 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 Quote See my profile for a list of my addons and ways to get support.
♥kymation Posted March 20, 2011 Author Posted March 20, 2011 Bug fix: In admin/includes/modules/header_tags/categories_insert.php, find $category_id and replace with $cInfo->categories_id (two places.) Regards Jim Quote See my profile for a list of my addons and ways to get support.
jay2k5 Posted April 13, 2011 Posted April 13, 2011 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 :) Quote
cdogstu99 Posted May 11, 2011 Posted May 11, 2011 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? Quote
♥kymation Posted May 11, 2011 Author Posted May 11, 2011 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 Quote See my profile for a list of my addons and ways to get support.
cdogstu99 Posted May 11, 2011 Posted May 11, 2011 Thanks Jim! Any clue on what exactly that code is? :rolleyes: Quote
♥kymation Posted May 11, 2011 Author Posted May 11, 2011 You can download the code here. Regards Jim Quote See my profile for a list of my addons and ways to get support.
cdogstu99 Posted May 12, 2011 Posted May 12, 2011 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! Quote
♥kymation Posted May 12, 2011 Author Posted May 12, 2011 catalog/includes/application_top.php. Compare the stock copy to yours, or just replace yours with the stock copy. Regards Jim Quote See my profile for a list of my addons and ways to get support.
cdogstu99 Posted May 12, 2011 Posted May 12, 2011 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.... Quote
♥kymation Posted May 12, 2011 Author Posted May 12, 2011 Did you add a title for that product/category? Regards Jim Quote See my profile for a list of my addons and ways to get support.
cdogstu99 Posted May 12, 2011 Posted May 12, 2011 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. Quote
♥kymation Posted May 12, 2011 Author Posted May 12, 2011 Look at that product in the products_description table of your database. Does that text appear in the head_title field? Regards Jim Quote See my profile for a list of my addons and ways to get support.
cdogstu99 Posted May 12, 2011 Posted May 12, 2011 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'); ?> Quote
♥kymation Posted May 12, 2011 Author Posted May 12, 2011 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 Quote See my profile for a list of my addons and ways to get support.
♥kymation Posted May 12, 2011 Author Posted May 12, 2011 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 Quote See my profile for a list of my addons and ways to get support.
cdogstu99 Posted May 12, 2011 Posted May 12, 2011 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? Quote
shsram Posted May 27, 2011 Posted May 27, 2011 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? Quote
♥kymation Posted May 27, 2011 Author Posted May 27, 2011 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 Quote See my profile for a list of my addons and ways to get support.
shsram Posted May 29, 2011 Posted May 29, 2011 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.