Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

This is not a Header Tags problem. First, if the database table names have been changed, youneed to go into includes/database_tables.php and change the names there also (do the same for the admin section). The error you are getting is saying it cannot write to the sessions table (or maybe the file, depending on how you have it set up). It may be blocked by a permsissions setting or maybe it is due to the changes made to the database. You need to restore a valid copy of the database and go from there.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

If you go to Text Control, change the default title and click Update, the default title stay changed? If you go back to admin, click on Page Control and then back on Text Control, does the tiitle reset?

If not,, without changing anything, go to includes/english/header_tag.php and see if the changes are there. Also see, if you can, the last modified time for that file. Was the file changed? What was the timestamp?

 

Jack

 

Jack,

 

You are correct. If I update the Default Title, it changes the file (header_tags.php) exactly as it should (time stamp looks right). But the second two fields (Default Description and Default Keywords) do not write to the file (header_tags.php).

 

If you click update, it shows the new Description and Keywords in the text field. However, if you navigate away from the page and come back, it re-sets to its original default settings.

 

Any thoughts?

 

If you would can't re-create the problem, I can give you access to my admin site.

 

Thanks,

 

Nick

Edited by pnkranger
Link to comment
Share on other sites

I can't reproduce the problem but having access to your admin would only show me the problem exists, which I believe you that it idoes, so that wouldn't help. Try this. Find this line in admin/header_tags_english.php

$main_desc = GetMainArgument($fp[$idx], $main_desc, $main['desc'], $formActive);

and add this right above it:

echo 'Desc Before = '. $fp[$idx].'<br>';

and this right under it:

echo 'Desc After = '. $fp[$idx].'<br>';

Then change the default description and click on Update. What is printed out on the screen at the top?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I can't reproduce the problem but having access to your admin would only show me the problem exists, which I believe you that it idoes, so that wouldn't help. Try this. Find this line in admin/header_tags_english.php
$main_desc = GetMainArgument($fp[$idx], $main_desc, $main['desc'], $formActive);

and add this right above it:

echo 'Desc Before = '. $fp[$idx].'<br>';

and this right under it:

echo 'Desc After = '. $fp[$idx].'<br>';

Then change the default description and click on Update. What is printed out on the screen at the top?

 

Jack

 

 

The top of the page shows the same thing before and after I update the description:

 

Desc Before = define('HEAD_DESC_TAG_ALL','osCommerce : What\\\'s New Here? - Hardware Software DVD Movies');

Desc After = define('HEAD_DESC_TAG_ALL','osCommerce : What\\\'s New Here? - Hardware Software DVD Movies');

 

The text field changes to show my updated version...however, when I leave the page and return, it has defaulted to the old title (What\\\'s New Here? - Hardware Software DVD Movies.

 

Does that help you?

Link to comment
Share on other sites

Hi Jack!

 

Thanks for your help!

 

First problem was solved by changing the last line in /includes/configure.php and admin/includes/configure.php

 

from: define('STORE_SESSIONS', '');

 

to: define('STORE_SESSIONS', 'mysql');

 

the second problem was fixed by renaming the database tables to the default names and by changing in the two database_tables.php files as you told me Jack

 

now everything works just fine!

 

//

 

Re: Database table name change from hosting company?

 

Hi!

 

I have tried to install HTC both on a new installation and on oter installation. Finally I have installd HTC on a brand new installation with all files from HTC full installation. It won't work

I get an error at the beginning when I enter Header tags in Admin:

 

Warning: session_start():open(/data/session/sess_85550a7e646070ea58a6647fb671df5a, O_RDWR) failed: Permission denied (13) in /data/members/paid/m/o/movieman.se/htdocs/www/admin/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /data/members/paid/m/o/movieman.se/htdocs/www/admin/includes/functions/sessions.php:67) in /data/members/paid/m/o/movieman.se/htdocs/www/admin/includes/functions/sessions.php on line 67

 

and in the end which looks like this:

 

Warning: Unknown(): open(/data/session/sess_85550a7e646070ea58a6647fb671df5a, O_RDWR) failed: Permission denied (13) in Unknown on line 0

 

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/data/session) in Unknown on line 0

 

The same error appears when I enter Page control, Text control and Fill Tags.

When I try to Fill all tag in the Fill Tags option I get the following error:

 

Warning: session_start(): open(/data/session/sess_85550a7e646070ea58a6647fb671df5a, O_RDWR) failed: Permission denied (13) in /data/members/paid/m/o/movieman.se/htdocs/www/admin/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /data/members/paid/m/o/movieman.se/htdocs/www/admin/includes/functions/sessions.php:67) in /data/members/paid/m/o/movieman.se/htdocs/www/admin/includes/functions/sessions.php on line 67

 

1146 - Table 'movieman_se_1.categories_description' doesn't exist

 

select categories_name, categories_id, categories_htc_title_tag, categories_htc_desc_tag, categories_htc_keywords_tag, language_id from categories_description where language_id = '1'

 

[TEP STOP]

 

Warning: Unknown(): open(/data/session/sess_85550a7e646070ea58a6647fb671df5a, O_RDWR) failed: Permission denied (13) in Unknown on line 0

 

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/data/session) in Unknown on line 0

 

I wonder if this have something to do with my service provider having renamed the table from products_description respectively categories_description to oscommerce_products_description respectively oscommerce_categories_description ?

 

In that case where do I change the database calls?

 

Or is this error caused by something else?

Hoping for an easy solution!

 

Anders

Link to comment
Share on other sites

Hi Everyone,

 

Tried installing Header Tags Controller v2.5.5. When I am finished I get the following error in the admin/header tags on the "Page Control" page:

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /hsphere/local/home/pontore/macsonsale.com/admin/header_tags_controller.php on line 254

 

I also get this error at the top of the "Text Control" page:

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /hsphere/local/home/pontore/macsonsale.com/admin/header_tags_english.php on line 58

 

I wiped it and did another clean install following all direction closely but same results.

 

Anybody have any idea how to fix this?

 

Thanks!!

 

PS. Sorry if I am posting this in the wrong place... Not sure hot wo start a new topic in this thread (newbie)

Link to comment
Share on other sites

I posted this as a new topic instead of a reply. I wish I knew how to move it here where it belongs.

 

Hi All,

 

I want to add a longer category description to my category pages. Does 2.5.5 do that? I see this file in the new download:

Update instructions to add the categories decription option to an existing 
installation of Header Tags by Jack_mcs (http://www.oscommerce-solution.com)

=============================================
The following instructions assumes a working shop with version V2.4 or higher
of Header Tags Controller already installed.

I am not sure how much of the install instruction I need to follow since I already have 2.4.2 installed. Do I run the entire SQL query? Or do I just install this one file?

 

Thanks for any help,

 

Tim

Link to comment
Share on other sites

Hi Everyone,

 

Tried installing Header Tags Controller v2.5.5. When I am finished I get the following error in the admin/header tags on the "Page Control" page:

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /hsphere/local/home/pontore/macsonsale.com/admin/header_tags_controller.php on line 254

 

I also get this error at the top of the "Text Control" page:

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /hsphere/local/home/pontore/macsonsale.com/admin/header_tags_english.php on line 58

 

I wiped it and did another clean install following all direction closely but same results.

 

Anybody have any idea how to fix this?

 

Thanks!!

 

PS. Sorry if I am posting this in the wrong place... Not sure hot wo start a new topic in this thread (newbie)

 

 

knifeman...sounds like you have not posted the files to your catalog directly. In your FTP program, navigate to the folder listed in the error message (includes/languages/english) and look for the header_tags.php. If it is not there, you have missed uploading it during the install. Find this file in the zip file and FTP it to the folder. It should work then.

 

I posted this as a new topic instead of a reply. I wish I knew how to move it here where it belongs.

 

Hi All,

 

I want to add a longer category description to my category pages. Does 2.5.5 do that? I see this file in the new download:

Update instructions to add the categories decription option to an existing 
installation of Header Tags by Jack_mcs (http://www.oscommerce-solution.com)

=============================================
The following instructions assumes a working shop with version V2.4 or higher
of Header Tags Controller already installed.

I am not sure how much of the install instruction I need to follow since I already have 2.4.2 installed. Do I run the entire SQL query? Or do I just install this one file?

 

Thanks for any help,

 

Tim

 

 

As for this question, the latest versions of HTC support additional Category Descriptions. You edit those descriptions the same way you add/edit a category using the Catalog/Products link.

Link to comment
Share on other sites

knifeman...sounds like you have not posted the files to your catalog directly. In your FTP program, navigate to the folder listed in the error message (includes/languages/english) and look for the header_tags.php. If it is not there, you have missed uploading it during the install. Find this file in the zip file and FTP it to the folder. It should work then.

As for this question, the latest versions of HTC support additional Category Descriptions. You edit those descriptions the same way you add/edit a category using the Catalog/Products link.

 

 

Hi Knifeman,

 

I thought that too but the files are definitely all uploaded to the correct folders on the site.

Just checked again to make sure. Thanks

Link to comment
Share on other sites

As for this question, the latest versions of HTC support additional Category Descriptions. You edit those descriptions the same way you add/edit a category using the Catalog/Products link.

Thank you for the replies. I believe my post was confused with another though. I have version 2.4.2 installed. If I want to install the latest 2.5.5, how much of the install package do I need to do? I don't want to break what I have and the instructions appear to be for people that have nothing installed already.

 

Actually, all I really want is to add longer category descriptions. Can I just add the 'update category description' part and not the rest? This is from the install file and it makes me think I can just add this one option:

Update instructions to add the categories decription option to an existing 
installation of Header Tags by Jack_mcs (http://www.oscommerce-solution.com)

Ideally I should upgrade the entire mod, but now I am back to question #1. How much of the install text do i need to do?

 

Tim

Link to comment
Share on other sites

Thank you for the replies. I believe my post was confused with another though. I have version 2.4.2 installed. If I want to install the latest 2.5.5, how much of the install package do I need to do? I don't want to break what I have and the instructions appear to be for people that have nothing installed already.

 

Actually, all I really want is to add longer category descriptions. Can I just add the 'update category description' part and not the rest? This is from the install file and it makes me think I can just add this one option:

Update instructions to add the categories decription option to an existing 
installation of Header Tags by Jack_mcs (http://www.oscommerce-solution.com)

Ideally I should upgrade the entire mod, but now I am back to question #1. How much of the install text do i need to do?

 

Tim

 

knifeman...at some point (in one of the full updates) the code as a whole was upgraded, meaning that both the admin and catalog side references were changed/shortened and the database changed to reflect these updates.

 

I think a partial update from 2.4.2 to 2.5.5 is pretty impossible unless you are willing to deal with a great deal of troubleshooting. It would probably take you less time to update the entire install.

Link to comment
Share on other sites

I think a partial update from 2.4.2 to 2.5.5 is pretty impossible unless you are willing to deal with a great deal of troubleshooting. It would probably take you less time to update the entire install.

Nicholas,

 

So I should just run all SQL queries as written? And update files according to the readme text? Of course some of my files will already be changed. It looks like a massive undertaking to do an upgrade also. I will have to figure out which parts are already changed and which ones have changed again.

 

I appreciate your time today,

 

Tim

Link to comment
Share on other sites

Nicholas,

 

So I should just run all SQL queries as written? And update files according to the readme text? Of course some of my files will already be changed. It looks like a massive undertaking to do an upgrade also. I will have to figure out which parts are already changed and which ones have changed again.

 

I appreciate your time today,

 

Tim

 

It seems like it would be pretty massive...but the parts of the files that are changed have not changed, i.e. still replacing the same text, etc., so you will just be swapping code.

 

I think the original author listed everything inside the:

 

<!-- BOF: HTC

 

or something similar, so not too hard to search and find it.

 

Wish there was an easier way, but I don't think there is.

 

Though, there might be update install directions inside...not really sure.

Link to comment
Share on other sites

Nicholas,

 

So I should just run all SQL queries as written? And update files according to the readme text? Of course some of my files will already be changed. It looks like a massive undertaking to do an upgrade also. I will have to figure out which parts are already changed and which ones have changed again.

 

I appreciate your time today,

 

Tim

There are two update sql files you may need, dending on what's in your databse. Run both the update_header_categories.sql and update_header_categories_description.sql files. That will bring your database up to the current level. You should backup first of course. On the shop side, there are additional changes needed for the index.php file to use the categories description. The includes/header_tags.php file needs to be changed to use the new sql fields. In admin, the english/header_tags_controler.php file has new entries. The admin/categories.php file will have quite a few changes. There are update instructions included with the contriubiton. Try following the instructions for each of those and you should be all set.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

There are two update sql files you may need, dending on what's in your databse. Run both the update_header_categories.sql and update_header_categories_description.sql files. That will bring your database up to the current level. You should backup first of course. On the shop side, there are additional changes needed for the index.php file to use the categories description. The includes/header_tags.php file needs to be changed to use the new sql fields. In admin, the english/header_tags_controler.php file has new entries. The admin/categories.php file will have quite a few changes. There are update instructions included with the contriubiton. Try following the instructions for each of those and you should be all set.

 

Jack

 

Thanks for the reply Jack.

 

I looked through the install files but I just could not figure out which parts I needed to change and which ones I could ignore since I already have 2.4.2

 

I am going to try what you have here later this weekend. Installing the first one was easy and everything works great. I am just a little anxious about messing everything up trying to update the mod.

Link to comment
Share on other sites

sorry for the reposts but I think my original got mixed up with another post...

 

Hi Everyone,

 

Tried installing Header Tags Controller v2.5.5. When I am finished I get the following error in the admin/header tags on the "Page Control" page:

 

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /hsphere/local/home/pontore/macsonsale.com/admin/header_tags_controller.php on line 254

 

I also get this error at the top of the "Text Control" page:

 

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /hsphere/local/home/pontore/macsonsale.com/admin/header_tags_english.php on line 58

 

If I try and update the info in "Text Control" when I click update I get:

 

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /hsphere/local/home/pontore/macsonsale.com/admin/includes/functions/header_tags.php on line 175

 

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /hsphere/local/home/pontore/macsonsale.com/admin/header_tags_english.php on line 58

 

Warning: chmod(): No such file or directory in /hsphere/local/home/pontore/macsonsale.com/admin/includes/functions/header_tags.php on line 203

Cannot change the mode of file (../includes/languages/english/header_tags.php)

I wiped it and did another clean install following all direction closely but same results.

 

Appreciate any assistance in helping me resolve this as this is an awesome contribution!

 

Thanks!!

Link to comment
Share on other sites

I responded in your other thread. Is your shop in a sub-directory?

 

Jack

 

 

Hi Jack,

 

Yes the root directory conatins a directory called Macsonsale.com

Inside that directory is the catalg and admin directories.

 

Thanks!

 

Mayson

Link to comment
Share on other sites

I would sure appreciate a little help.

 

I went through the process of installing this and everything seemed to go really well. However, when I use the admin tool to add a title that specific product page doesn't show up. It's suddenly just a blank page... no error messages or anything. I can add keywords and a description fine... it's the title that breaks it.

 

If I go back in the admin tool, and take them out, it's fine again.

 

product_info.php has the following code added:

 

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// 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 v2.5.2
?>

 

which seems to be exactly what was instructed.

 

Has anyone else run into this and found a solution?

 

Thanks much in advance. I'm really excited to get this mod working.

 

Mike

 

Also, when I view the source on that blank page, this is all that's there:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

<head>

Edited by maksum
Link to comment
Share on other sites

Hi Jack,

 

Yes the root directory conatins a directory called Macsonsale.com

Inside that directory is the catalg and admin directories.

 

Thanks!

 

Mayson

In that case, you need to open the admin/header_tags_controller.php and admin/header_tags_english.php files and change the lines that start with $filename = '../' . DIR_WS_LANGUAGES to $filename = '../catalog/' . DIR_WS_LANGUAGES

 

Jack

 

 

I would sure appreciate a little help.

 

I went through the process of installing this and everything seemed to go really well. However, when I use the admin tool to add a title that specific product page doesn't show up. It's suddenly just a blank page... no error messages or anything. I can add keywords and a description fine... it's the title that breaks it.

 

If I go back in the admin tool, and take them out, it's fine again.

 

product_info.php has the following code added:

 

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// 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 v2.5.2
?>

 

which seems to be exactly what was instructed.

 

Has anyone else run into this and found a solution?

 

Thanks much in advance. I'm really excited to get this mod working.

 

Mike

 

Also, when I view the source on that blank page, this is all that's there:

What is the name that you are entering for the page title? I'm confused since you posted the product_info page code which shouldn't have anything to do with a new page entry.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Sorry, if I wasn't clear. I'm not entering a new page. I'm going into my catalog, selecting an existing product, and going in to edit it. With this mod I now have "Title", "keywords", and "description" fields I can fill out. I can put anything in "Keywords" and "description" and it works just as it should. I go to my site, look at that product, view the source, and there are the keywords and description just as expected.

 

However, if I try to put anything in the "Title" field, the product page doesn't end up loading. It's fine if I leave it blank, and it just defaults to the site Title. but if I put anything in the product's "title" field, it breaks.

 

is that clear?

 

Thanks again.

 

Mike

Link to comment
Share on other sites

When clicking (explain) using header_tags_popup_help.php the bottom of the text popup window there is the following error.

 

Warning: Cannot modify header information - headers already sent by (output started at d:\web_sites\xxxxxxx\xxxxxxx\admin\includes\languages\english\header_tags_popup_help.php:13) in d:\web_sites\xxxxxxx\xxxxxxx\admin\includes\functions\general.php on line 85

 

 

Any clue to this error

 

 

Jimmy

I'm not a coder just a splicer.

Link to comment
Share on other sites

In that case, you need to open the admin/header_tags_controller.php and admin/header_tags_english.php files and change the lines that start with $filename = '../' . DIR_WS_LANGUAGES to $filename = '../catalog/' . DIR_WS_LANGUAGES

 

Jack,

 

I really appreciate your help with this!

That fixed the problem and now it seems to be working well.

Awesome Contrib and also very kind of you to take the time to lend me a hand.

 

Mayson

Link to comment
Share on other sites

Sorry, if I wasn't clear. I'm not entering a new page. I'm going into my catalog, selecting an existing product, and going in to edit it. With this mod I now have "Title", "keywords", and "description" fields I can fill out. I can put anything in "Keywords" and "description" and it works just as it should. I go to my site, look at that product, view the source, and there are the keywords and description just as expected.

 

However, if I try to put anything in the "Title" field, the product page doesn't end up loading. It's fine if I leave it blank, and it just defaults to the site Title. but if I put anything in the product's "title" field, it breaks.

 

is that clear?

 

Thanks again.

 

Mike

If the description and keywords are being displayed correctly, then the problem is mostly an error in the categories.php file. Try using the categories.php file from the contribution. If it works, then there is an installation error on that page.

 

Jack

 

 

When clicking (explain) using header_tags_popup_help.php the bottom of the text popup window there is the following error.

 

Warning: Cannot modify header information - headers already sent by (output started at d:\web_sites\xxxxxxx\xxxxxxx\admin\includes\languages\english\header_tags_popup_help.php:13) in d:\web_sites\xxxxxxx\xxxxxxx\admin\includes\functions\general.php on line 85

Any clue to this error

Jimmy

Open the header_tags_popup_help.php file and place the curso at the very end of the file. Then backspace (using the backspace key) until you get to the ?>. Save it and see if the problem is fixed.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

If the description and keywords are being displayed correctly, then the problem is mostly an error in the categories.php file. Try using the categories.php file from the contribution. If it works, then there is an installation error on that page.

 

Jack

 

Hmmm, replaced that with a clean version, and it's still doing the exact same thing. I will re-do the installation process, see if I can pin it down.

 

Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...