close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Warning on live page - help pleae

Thread began 1/20/2013 3:42 pm by Roxana | Last modified 1/21/2013 12:40 pm by Roxana | 834 views | 6 replies |

Roxana

Warning on live page - help pleae

Hi there,

As already mentioned in another thread, I get a warning, when I add a certain product to the cart (I opened a new thread, because this warning does not seem to have anything to do with the question asked in the other thread). The product is added, but the the browser does not open the cart page like it should.

This only happens with one product (recordID 13). All other products are OK.

This is the warning:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/www.segufixshop.eu/web/detail.php:372) in /var/www/html/www.segufixshop.eu/web/detail.php on line 386

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/www.segufixshop.eu/web/detail.php:372) in /var/www/html/www.segufixshop.eu/web/detail.php on line 420

I am stumped how this could happen only with one product and not any of the others. I checked for blank spaces, but cannot imagine that to be the problem, because it does only happen with one product. Here are the links:
detail.php?recordID=13
detail.php?recordID=14

I noticed the warning after adding product variations to the price table for record 13. But after uploading the old database again, the warning remained.

Could anyone please help me?

Sign in to reply to this post

Jason ByrnesWebAssist

The error message happens when there is output to the page before the header function to redirect.

the error is reporting the problem at line 372 of the details page.

if you need help locating the cause, send a copy of the page so i can look at the code.

Sign in to reply to this post

Roxana

Thanks,

I am surprised that it happens for one product only and not the others.

Attached Files
detail.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the probelm is the dynamic dropdowns code at lines 347 - 392:

php:
<?php

if ($row_rssize)     {
  echo 
"<SC" "RIPT>\n";
  echo 
"var WAJA = new Array();\n";
  
$oldmainid 0;
  
$newmainid $row_rssize["version_id"];
  if (
$oldmainid == $newmainid)    {
    
$oldmainid "";
  }
  
$n 0;
  while (
$row_rssize)     {
    if (
$oldmainid != $newmainid)     {
      echo 
"WAJA[".$n."] = new Array();\n";
      echo 
"WAJA[".$n."][0] = '".WA_DD_Replace($newmainid)."';\n";
      
$m 1;
    }

    echo 
"WAJA[".$n."][".$m."] = new Array();\n";
    echo 
"WAJA[".$n."][".$m."][0] = "."'".WA_DD_Replace($row_rssize["size_id"])."'".";\n";
    echo 
"WAJA[".$n."][".$m."][1] = "."'".WA_DD_Replace($row_rssize["size"])."'".";\n";

    
$m++;
    if (
$oldmainid == 0)      {
      
$oldmainid $newmainid;
    }
    
$oldmainid $newmainid;
    
$row_rssize mysql_fetch_assoc($rssize);
    if (
$row_rssize)     {
      
$newmainid $row_rssize["version_id"];
    }
    if (
$oldmainid != $newmainid)     {
      
$n++;
    }
  }

  echo 
"var rssize_WAJA = WAJA;\n";
  echo 
"WAJA = null;\n";
  echo 
"</SC" "RIPT>\n";
}
function 
WA_DD_Replace($startStr)  {
  
$startStr str_replace("'""|WA|"$startStr);
  
$startStr str_replace("\\""\\\\"$startStr);
  
$startStr preg_replace("/[\r\n]{1,}/"" "$startStr);
  return 
$startStr;
}
?>



this code should come after the doctype tag, not before.

Sign in to reply to this post

Roxana

Thank you Jason, that fixed the problem. I am still baffled why it would produce the warning for one product and not for the others, but I am very glad it is fixed.

Sign in to reply to this post

Jason ByrnesWebAssist

it produced the problem for items that included a size.

items that did not include a size, did not utilize thew Dynamic Dropdowns script.

Sign in to reply to this post

Roxana

That's the thing, product id 13 and product id 14 are very similar, both with sizes and versions. But the warning only showed up for product 13, not product 14. I didn't try all products, but for all products I tried (all with size and version) there was no warning.

In addition, this site has been running for a few years without problems. I have to admit I haven't tested in a while, but it is our main product and we never had a complaint.

Maybe this one will remain a mystery :)

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...