Zen Cart Logo
Forums / General Questions / At my wits end with Meta_tags

At my wits end with Meta_tags

Views: 2,007

Results 1 to 15 of 15
29 Sep 2012, 2:41 PM
#1
serenity_works avatar

serenity_works

New Zenner

Join Date:
Sep 2012
Location:
wales,UK
Posts:
7
Plugin Contributions:
0

At my wits end with Meta_tags

I am reconstructing my site after a brutal hack of my zencart site, obviously I have upgraded to the version1.5 for this reconstruction.
The person before me who constructed my site (it was a favour) put everything everywhere no over ride files etc so I am learning as I go with this thought the site was pretty much fully functional until the hack.

I have created override files like your supposed to and they are working fine as I use them as intended.

BUT I have spent two weeks now trying to sort the site title out etc. Originally I wanted metatags but after the amount of time I have had dealing with the issues presented I just ended up thinking I'll just do the site title but if someone can help me to even get metatags to work. I would be obliged.

my site is b a b i s e r e n . c o . u k / newsite[/URL]

Okay I have found the meta-tag.php file in newsite/includes/languages/english.

I have modified the parts between the ' ' to the words I need being very careful to follow how it was from the original Zencart titles, keywords I originally tried to add, @ first with capital letters at the beginning then lower case but none worked on loading.

I have attached the template to show you what I am seeing it is blank and yes I have even tried to "load" this

 // page title
define('TITLE', '');

// Site Tagline
define('SITE_TAGLINE', '');

// Custom Keywords
define('CUSTOM_KEYWORDS', '');

// Home Page Only:
  define('HOME_PAGE_META_DESCRIPTION', '');
  define('HOME_PAGE_META_KEYWORDS', '');

  // NOTE: If HOME_PAGE_TITLE is left blank (default) then TITLE and SITE_TAGLINE will be used instead.
  define('HOME_PAGE_TITLE', ''); // usually best left blank


// EZ-Pages meta-tags.  Follow this pattern for all ez-pages for which you desire custom metatags. Replace the # with ezpage id.
// If you wish to use defaults for any of the 3 items for a given page, simply do not define it.
// (ie: the Title tag is best not set, so that site-wide defaults can be used.)
// repeat pattern as necessary
  define('META_TAG_DESCRIPTION_EZPAGE_#','');
  define('META_TAG_KEYWORDS_EZPAGE_#','');
  define('META_TAG_TITLE_EZPAGE_#', '');

// Per-Page meta-tags. Follow this pattern for individual pages you wish to override. This is useful mainly for additional pages.
// replace "page_name" with the UPPERCASE name of your main_page= value, such as ABOUT_US or SHIPPINGINFO etc.
// repeat pattern as necessary
  define('META_TAG_DESCRIPTION_page_name','');
  define('META_TAG_KEYWORDS_page_name','');
  define('META_TAG_TITLE_page_name', '');

// Review Page can have a lead in:
  define('META_TAGS_REVIEW', 'Reviews: ');

// separators for meta tag definitions
// Define Primary Section Output
  define('PRIMARY_SECTION', ' : ');

// Define Secondary Section Output
  define('SECONDARY_SECTION', ' - ');

// Define Tertiary Section Output
  define('TERTIARY_SECTION', ', ');

// Define divider ... usually just a space or a comma plus a space
  define('METATAGS_DIVIDER', ' ');

// Define which pages to tell robots/spiders not to index
// This is generally used for account-management pages or typical SSL pages, and usually doesn't need to be touched.
  define('ROBOTS_PAGES_TO_SKIP','login,logoff,create_account,account,account_edit,account_history,account_history_info,account_newsletters,account_notifications,account_password,address_book,advanced_search,advanced_search_result,checkout_success,checkout_process,checkout_shipping,checkout_payment,checkout_confirmation,cookie_usage,create_account_success,contact_us,download,download_timeout,customers_authorization,down_for_maintenance,password_forgotten,time_out,unsubscribe,info_shopping_cart,popup_image,popup_image_additional,product_reviews_write,ssl_check,shopping_cart');


// favicon setting
// There is usually NO need to enable this unless you need to specify a path and/or a different filename
//  define('FAVICON','favicon.ico');

I use firefox as my ftp client, (which recently I was told that it did not work with my server by my hosting company how true can that be being a green horn I am stumped.)

When adding it to /newsite/includes/languages/english/template

It works on the live site but wipes out my access to the admin page... WHITE SCREEN
I know it is associated with putting ' or (.) or spaces where they should not be BUT I have followed it to the letter.
It has gotten to the point of tears now. I do not want my site going live with Zen cart emblazoned across it.
I have researched this issue for a very long time now PLEASE SOMEONE HELP.

29 Sep 2012, 2:51 PM
#2
serenity_works avatar

serenity_works

New Zenner

Join Date:
Sep 2012
Location:
wales,UK
Posts:
7
Plugin Contributions:
0

Re: At my wits end with Meta_tags

ftpclient is filezilla

29 Sep 2012, 4:31 PM
#3
joejoejoe avatar

joejoejoe

Zen Follower

Join Date:
Oct 2011
Location:
AZ
Posts:
383
Plugin Contributions:
0

Re: At my wits end with Meta_tags

If you've played with the file and now you have the white-screen of nothingness then the easiest quick fix is to download a fresh version of ZC, unzip it, find the file you played with and upload it to your website to overwrite the messed up one. The permissions for that file are 644 which you can set from your host's cpanel.

I looked at the site you linked to. I don't see "zen cart" anywhere up top so you might have fixed that part. I did see "Tag Line Here" in the upper right of your screen. I viewed source and it's showing this: <div id="tagline">TagLine Here</div> If you use developers tool kit from the admin panel to search for TagLine Here you will find the file it is in and you can go in and change it to Babies For Sale or a logo of your choosing.

As for the tab up top of the browser, yours is now showing the full URL of your store because you zeroed it out (cleaned out the space between the apostrophes). The original meta-tags file had this in that meta-tags file:
// page title
define('TITLE', 'Zen Cart!');

// Site Tagline
define('SITE_TAGLINE', 'The Art of E-commerce');

If you want to change that (it sounds like you do) and you've tried replacing those words with ones of your own choosing, then maybe you're using some special character that throws everything off. What exactly do you want to put as the title and tagline, maybe it's got some character that is verboten and we can escape it out?

29 Sep 2012, 7:06 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: At my wits end with Meta_tags

Serenity_works:

When adding it to /newsite/includes/languages/english/template

It works on the live site but wipes out my access to the admin page... WHITE SCREEN
So is your post specifically about this point that your admin page is showing up blank? Or is it broader than just that?

FAQ on blank pages: http://www.zen-cart.com/content.php?124-blank-page

29 Sep 2012, 10:21 PM
#5
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: At my wits end with Meta_tags

I have created override files like your supposed to and they are working fine as I use them as intended.
Okay I have found the meta-tag.php file in newsite/includes/languages/english.
I have modified the parts between...
I assume you mean you have copied the file and are modifying the override copy:
newsite/includes/languages/YOUR_TEMPLATE/english.php

1 Oct 2012, 9:08 AM
#6
serenity_works avatar

serenity_works

New Zenner

Join Date:
Sep 2012
Location:
wales,UK
Posts:
7
Plugin Contributions:
0

Re: At my wits end with Meta_tags

To Joejoejoe Right now my admin page is a white out I have left it like that so someone can help.
My tagline I am waiting for a friend to redesign my logo so that is not a problem.
The metatag way you have shown I have been doing.
All that is typed in there Is 'Babi Seren' <-- title
and 'for your little stars needs' <---- Site tag line
Even when they are zeroed out it does not work. Just a white screen

1 Oct 2012, 9:17 AM
#7
serenity_works avatar

serenity_works

New Zenner

Join Date:
Sep 2012
Location:
wales,UK
Posts:
7
Plugin Contributions:
0

Re: At my wits end with Meta_tags

@ DR Byte specifically the blank screen ONLY when I modify this file does it do this.
I have read through the blank screen FAQ's and numerous others even tangent links to this topic nothing seems to help.
I have numerous backups of the site so I remove and copy a fresh one to modify even used the old one from my other site nothing.
The site as you can see will work in this setup I just cannot get to the admin to start the adding of products while I wait for my art work to come back.

1 Oct 2012, 9:26 AM
#8
serenity_works avatar

serenity_works

New Zenner

Join Date:
Sep 2012
Location:
wales,UK
Posts:
7
Plugin Contributions:
0

Re: At my wits end with Meta_tags

@Torvista Yes I copy the files to modify and reupload to the override file not remove them, obviously the override system would not work if I just moved the file (or at least I assume this).
Oh forgot @ Joejoe joe I have tried the file permissions to allow full access for modification etc etc etc absolute ZIP, I thought that might be causing issues Nope.

As you can see those who replied I am really on a headscratcher
Are there any other files attached to this one oh Zen cart masters, which might affect how it works? I may have modified one and unknowingly caused myself problems which have not showed until now on modifying this one.
I hope you can help

1 Oct 2012, 9:51 AM
#9
serenity_works avatar

serenity_works

New Zenner

Join Date:
Sep 2012
Location:
wales,UK
Posts:
7
Plugin Contributions:
0

Re: At my wits end with Meta_tags

DR byte I just checked my debug folders (forgot to look in there tbh) and got an error I do not understand
[01-Oct-2012 04:08:41] PHP Warning: Cannot modify header information - headers already sent by (output started at /home//public_html/newsite/includes/languages/english//meta_tags.php:1) in /newsite/includes/init_includes/init_templates.php on line 78
[13-Sep-2012 13:04:00] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/
/public_html/newsite/includes/languages/english/meta_tags.php:1) in newsite /
/includes/init_includes/init_templates.php on line 28
[13-Sep-2012 13:04:00] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/
/public_html/newsite/includes/languages/english/meta_tags.php:1) in /newsite /**/includes/functions/general.php on line 21

The 13 september is quite a repetitive issue, replaced by the 1 oct one when modifying the file and using the override files, I have not touched these other folders (init or general). I get its trying to tell me that these files already have the info BUT what do I do now how come they have the same info? Completely confused now, and do not know what to do!

1 Oct 2012, 4:15 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: At my wits end with Meta_tags

headers already sent by (output started at /home//public_html/newsite/includes/languages/english/*/meta_tags.php:1)

This means that your meta_tags.php has sent something (possibly just one blank space) before the proper HTML head section was built. Look closely at that file and make sure there is nothing before the <?php opening tag (since it says line 1).

1 Oct 2012, 4:30 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: At my wits end with Meta_tags

When the error is happening on line 1, as Glenn pointed out, sometimes it's caused by your editor saving the file incorrectly. With v1.5.0 and newer, the language files need to be saved in "UTF8-without-BOM" encoding format. If your editor isn't "saving without BOM", then there will be hidden characters in the beginning of the file, causing your symptoms.

"BOM" is "byte order mark", and is a set of invisible characters that are not needed by PHP files, and actually cause problems. Hence the instructions in the first lines of all the language files to remind you to set your editor to save as utf8-without-bom.

2 Oct 2012, 11:31 AM
#12
serenity_works avatar

serenity_works

New Zenner

Join Date:
Sep 2012
Location:
wales,UK
Posts:
7
Plugin Contributions:
0

Re: At my wits end with Meta_tags

Thankyou Thankyou Thankyou
IT WORKED
You are absolute stars!!!!
gjh42 and DrByte I love you guys!!
gjh42 thankyou for pointing me in the right direction and thankyou DR Byte for the detailed explanation I now understand fully what the issue was.
I never would have found it on my own two web designers could not give me explanations and you guys did within 24hours!! :D
I had Microsoft web expressions the first version which could not do the UTF8 without BOM, which you indicated was was the issue, so I did some digging and moved to Kommodo Edit 7.1 though clunky and slightly a pain to work with it worked when I changed the UTF8 (I'm sure I'll get the hang of this new software soon, as it works I think I might be sticking to it).
Thankyou once again this has been so helpful and enlightening especially to a beginner with limited but growing knowledge :D:D:D

2 Oct 2012, 3:07 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: At my wits end with Meta_tags

Microsoft Expression Web is crap. Don't use it when working with PHP files.
It's barely suitable for .html files. It wrecks anything else.

8 Oct 2012, 11:44 PM
#14
northfork avatar

northfork

New Zenner

Join Date:
Oct 2004
Location:
Montana
Posts:
43
Plugin Contributions:
0

Re: At my wits end with Meta_tags

DrByte:

When the error is happening on line 1, as Glenn pointed out, sometimes it's caused by your editor saving the file incorrectly. With v1.5.0 and newer, the language files need to be saved in "UTF8-without-BOM" encoding format. If your editor isn't "saving without BOM", then there will be hidden characters in the beginning of the file, causing your symptoms.

"BOM" is "byte order mark", and is a set of invisible characters that are not needed by PHP files, and actually cause problems. Hence the instructions in the first lines of all the language files to remind you to set your editor to save as utf8-without-bom.

Aha! This helped me too. :cool: My problem was with /includes/configure.php. Once I re-saved it without BOM I stopped getting blank pages when adding a product to the cart.

I notice that Araxis Merge and Dreamweaver both default to saving files with BOM. Notepad++ seems to default to ANSI, at least for new documents. I can't tell what Winmerge does...

I didn't see anything about this in the Upgrade instructions. Perhaps a mention there might save some time in future tech support posts?

8 Oct 2012, 11:53 PM
#15
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: At my wits end with Meta_tags

Notepad++ seems to default to ANSI

To avoid confusion with Notepad++, once you convert the encoding to utf-8, then save it then open it...its shown as ANSI again UNLESS there is a multibyte character somewhere in the file. For example put an accented character like ñ or á in the comments somewhere and the file will "stay" as utf-8.