Jump to content
Sign in to follow this  
thebakerboy

cDynamic Meta Tags

Recommended Posts

Hi can anyone point out what might be causing the following error messages are appearing when I update a product in the admin.

 

Warning: Invalid argument supplied for foreach() in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php:36) in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/functions/general.php on line 22

 

Hopefully its something simple, pages still update the info I change and meta tags are created on the pages with no problems.

 

Thanks for any help with this.

 

Here's a link if it helps, bathireland.com

Share this post


Link to post
Share on other sites

1.reset_meta_cache.php near line 36

make sure that the value passing in foreach is not null

like

if($val !== "") { foreach($val as $value) { //statement } }

 

2. general.php on line 22

check whether you had given a echo some where,

if there then comment it out.

 

hope this will solve your problem..

 

 

Hi can anyone point out what might be causing the following error messages are appearing when I update a product in the admin.

 

Warning: Invalid argument supplied for foreach() in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php:36) in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/functions/general.php on line 22

 

Hopefully its something simple, pages still update the info I change and meta tags are created on the pages with no problems.

 

Thanks for any help with this.

 

Here's a link if it helps, bathireland.com

Share this post


Link to post
Share on other sites

shoaibkhan thansk for replying have had a look and it looks ok to me, but i'm far from an expert. I have posted the sections of code below

 

reset_meta_cache.php near line 36 code reads as follows

 

foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) {
   unlink($filename_page);
   }

 $exists = mysql_query("SELECT 1 FROM cache LIMIT 0");
 if ($exists) tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%meta-cache'");

 

general.php line 22 reads

 

header('Location: ' . $url);

 

 

Karl

Share this post


Link to post
Share on other sites

Good evening,

 

I was pleasantly surprised to read that somebody had the same errors on the same file in the same lines.

 

I've been searching this forum for a solution but could not find any. It is not the common error with text or space after or before the <?php or ?>

Can the cause perhaps be found this time ?

 

Best Regards

Nala

 

Hi can anyone point out what might be causing the following error messages are appearing when I update a product in the admin.

 

Warning: Invalid argument supplied for foreach() in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php:36) in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/functions/general.php on line 22

 

Hopefully its something simple, pages still update the info I change and meta tags are created on the pages with no problems.

 

Thanks for any help with this.

 

Here's a link if it helps, bathireland.com


Leben und leben lassen - live and let live - vivrer et laisser vivre

Share this post


Link to post
Share on other sites

I had the same problem. I // out line 27 in the categories.php file which said " if ( eregi("(insert|update|setflag|confirm)", $action) ) include_once('includes/reset_meta_cache.php');"

 

no error message , but no idea what it will do to the meta module output.

Share this post


Link to post
Share on other sites

I also get this error, has anyone identified a fix, its annoying more than anything and it is intermittent and for me usually occurs when i toggle a product from being out of stock to being in stock

Share this post


Link to post
Share on other sites

Hello. I have a problem with the title and the description of the page. This are identical.

I need a smaller title, and I need the discription separate. Can you help please.

 

 

Take a look: www.parfumurione.net

Share this post


Link to post
Share on other sites

i think i found a fix for my problem, it was listed on a Dutch Oscommerce forum,

 

all i did was the following:

 

change this:

 

 foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) {
   unlink($filename_page);
   }

 

 

to this

 

if (is_array ($meta_cache_files_path ."{*. meta-cache }")){ 
foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) {
   unlink($filename_page);
   }
  }

 

in /admin/includes/reset_meta_cache.php

 

seems to have worked thus far :)

Share this post


Link to post
Share on other sites

i think i found a fix for my problem, it was listed on a Dutch Oscommerce forum,

 

all i did was the following:

 

change this:

 

 foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) {
 unlink($filename_page);
 }

 

 

to this

 

if (is_array ($meta_cache_files_path ."{*. meta-cache }")){
foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) {
 unlink($filename_page);
 }
 }

 

in /admin/includes/reset_meta_cache.php

 

seems to have worked thus far smile.gif

 

This worked for me, thanks.


Founder & Director at CSC Tours Ltd

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  

×