Question

I have an unusual issue. If I use name="adBody" and id="adBody" for my textarea, it fails to appear.

If I instead use id="adBoty" then my text area appears fine.

Here's the code (by the way, $adText is set to ="" in the php at the top of this file):

<textarea rows="7" cols="68" name="adBody" id="adBody" ><?php echo $adText ?></textarea>

I next tried this and the textarea still will not appear (changed the name, got rid of the php):

<textarea rows="7" cols="68" name="thisIsATextArea" id="adBody" ></textarea>

I tried this and the text area appears fine:

  <textarea rows="7" cols="68" name="adBody" id="theEditText" ><?php echo $adText ?></textarea>

This textarea with name="adBody" and id="adBody" has been working fine since I wrote it 3 months ago. Today after uploading this code to our staging server for the first time, I noticed that somewhere somehow the textarea had vanished. I was testing every feature in the (admittedly small) project after deploying it for the first time on our staging server and that's when I noticed the missing textarea.

MY FIRST THOUGHT: "I must have a stray line of code somewhere like this:"

    document.getElementById('adBody').style.display = "none";

NOPE. I searched the entire code base (and there is not much code in our project yet anyways) using Netbeans's 'Find' on the entire source tree.

No line of code, anywhere in the entire source code, is hiding any DOM element that has an id of "adBody". In fact, there is no line of code like the above hiding any DOM element.

I'm sure this has got to be a weird memory stomp issue or a namespace issue or SOMETHING that has gotten corrupted. I have not touched the textarea for months and it's been fine. This is how I originally wrote it, and it worked FINE for 3 months until I noticed it today.

 <textarea rows="7" cols="68" name="adBody" id="adBody" ><?php echo $adText ?></textarea>

I know this is not easy to suggest a solution for but if anyone has seen a weird side effect like this and discovered the real, underlying problem, I'm all ears.

Even though my textarea, as long as I don't use id="adBody" as its ID, is appearing fine now, I suspect there is a bigger underlying issue that is causing this, maybe a stray DOCTYPE issue, but I cannot find it.

Was it helpful?

Solution

This is usually caused by ad blocker plugins like adblock plus,adblocker, etc.

Plugins like adblock plus do have descriptions of what makes an ad "acceptable", but it is not guaranteed to make it so they pass through their filters

This question seems to have an accepted answer which could help to detect an ad blocker present, but not sure if it works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top