Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-09-19 11:01:28

daz
New Member
Registered: 2012-09-19
Posts: 5

extra words/characters in pages (random code)

hi there,

Many apologies in advance if this has been dealt with before (I couldn’t find it) or if I’m just being an idiot. However, this is baffling me.

I just get extra characters appearing at the end of pages and forms, for apparently no reason. They are usually fragments of words or bits of markup, for example, at the end of one of my pages the following text appeared after the last tag:

</body>
</html>/body

.. and I definitely didn’t put it there. It’s always at the very end, but it’s not always the same text. If I find it in the backend and delete it, everything is ok for a while, but then it’ll pop up somewhere else.

Any ideas?

Many thanks

{Added “random code” to title for better findability . – Uli}

Last edited by uli (2012-09-19 12:21:20)

Offline

#2 2012-09-19 11:25:49

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,834
Website

Re: extra words/characters in pages (random code)

Hi daz. It has been reported before but we never got to the bottom of it and would dearly love to do so.

Since none of us on the dev team can replicate this behaviour on our own server setups, I wonder if it would be too much to ask for some access credentials to a) your textpattern installation and/or b) your host’s server so one of us may try to put some debugging code directly into your installation to unravel the mystery.

If you have a live site on this domain (or you simply don’t trust us *gasp* :-) then it might not be practical to do so. In which case we’ll have to try more traditional diagnostic measures. I’m trying to chart whether there’s any correlation between PHP / MySQL version or some installed extensions or plugins, for example, so any information you can supply in this regard (from Admin>Diagnostics — high) would be beneficial as a starting point.

You can send any access details direct to one of our e-mail addresses from our websites, or from the team contact page. Many thanks in advance for your assistance.

Last edited by Bloke (2012-09-19 11:57:53)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2012-09-19 12:24:22

daz
New Member
Registered: 2012-09-19
Posts: 5

Re: extra words/characters in pages (random code)

hey, thanks for such a quick reply.

Funnily enough, this is happening on two live sites, and they’re both on the same hosting provider. Maybe that’s something to do with it?

Frustratingly, however, I can’t even replicate it myself; it does really seem rather random.

One of these sites is my own personal fledgling site, which you’re more than welcome to mess around with. I’ll email you some credentials.

Offline

#4 2012-09-19 19:27:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,834
Website

Re: extra words/characters in pages (random code)

daz / all

OK, after some extensive testing, noodling, comparison of host environments and debugging on the server that daz graciously let me use I have confirmed it is indeed a bug, but thankfully not in Textpattern. Or at least, not directly as far as I can tell.

My initial inkling was that it might be an AJAX thing, but as it happens on the Pages/Forms/Styles panels I ruled that out. It is repeatable (to a fashion) insofar as it happens more than once under seemingly random circumstances, but only rears its head if you use the Opera browser. Firefox and Chrome were fine; didn’t try Safari as I’m too poor to own any fruit-based devices (and I won’t ever stoop so low as to install Safari for Windoze ever again).

After confirming it was the browser itself, I then went a Googlin’. Look familiar? That was the exact sort of thing I saw on two occasions on daz’ site, and is exactly the thing that he captured and sent me in screenshots, and seems to correlate with other reports on this forum.

The browser sometimes seems to “copy” small random snippets of text from a higher portion of the textarea and plonk them at the very end, which if you don’t notice it when you save, gets committed to the Page / Form / Article and then appears on your site. I tried it with Opera 12.02 (1578)/Win and by all accounts the people on the Opera forum are saying it’s not fixed in the latest beta. A ticket has been raised, all I can suggest is to make some noise until they find out what the problem is. It may transpire that there’s something we can do in the core that might help mitigate the problem in future, but right now it looks solely as if it’s a browser issue.

I’ll reference the other forum topics here for the time being and I hope that helps. Thanks again to daz for the loan of his server. I consider this issue closed from Textpattern’s perspective.

P.S. searching for “phantom textarea contents opera” got me lots of offers of tickets to Phantom of the Opera. Note to self: think before searching…

Last edited by Bloke (2012-09-19 19:48:05)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2012-09-19 19:47:36

etc
Developer
Registered: 2010-11-11
Posts: 3,418
Website

Re: extra words/characters in pages (random code)

Ahem… there is a mention of Firefox here, though it might have been fixed in latest versions. I have already observed phantom text with Firefox, but it was truly phantom, i.e. was not saved.

Offline

#6 2012-09-19 19:55:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,834
Website

Re: extra words/characters in pages (random code)

etc wrote:

Ahem… there is a mention of Firefox here

Didn’t spot that. Well I couldn’t get it to do it in FF, but as I say, it may be something we’re doing in the core but I can’t see how. The reason being that one time I spotted it I hadn’t interacted at all with the panel other than to scroll both the page and textarea up and down a few times with the mousewheel and cursor, and navigate from one tab to another. There it was, the word “logo” added to the bottom of the textarea.

I quickly checked the source code of both the admin-side panel and the public site, and that word only appeared once, inside a div class definition. I then went back to the admin side, hit Save and sure enough it was in the $_POST transaction and was committed to the DB, and dutifully appeared on the public site. I went back, deleted it from the Page and it went away. Then I couldn’t for the life of me repeat it for ages.

So whereas the FF one may just be a rendering bug that doesn’t actually put physical text into the textarea, Opera’s seems to actually paste stuff in. It didn’t appear to be anything to do with what was in the clipboard, though it may have been something to do with smooth scrolling. After I’d spotted the bug above first time, I went and switched smooth scrolling off ‘cos it does my head in (too slow). It didn’t occur again. Coincidence? Maybe, maybe not.

Last edited by Bloke (2012-09-19 19:56:07)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2012-09-19 21:25:34

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,175
Website

Re: extra words/characters in pages (random code)

I never have smooth scrolling on so I don’t think it’s that. I made a change recently that may be connected. In Opera Preferences History, for ‘Check if cached page is updated on the server’ I had ‘Check documents’ set to Never. I have it set to Always now and have not seen the random text lately. Coincidence? Probably but you might want to check.


Wondrous Healing 3 wondrous ways to a healthy old age
Safe Reiki Harmless natural healing.

Offline

#8 2012-09-20 07:37:14

etc
Developer
Registered: 2010-11-11
Posts: 3,418
Website

Re: extra words/characters in pages (random code)

Since it happens with 4.4.1 too, it’s definitely a browser issue for me. I do not think any txp js listens for mouse scrolling, even in 4.5. It could be some browser extension’s fault too.

Offline

#9 2012-09-20 09:23:16

daz
New Member
Registered: 2012-09-19
Posts: 5

Re: extra words/characters in pages (random code)

stef, thanks for spending time on this. It does feel like a browser-y thing rather than a raw txp problem, but nevertheless I think it’s a pretty strange thing for a browser to do. I use all the main browsers interchangeably, and I hadn’t noticed (thus far) that it was confined to Opera, but I’ll figure this out fairly quickly. My last thought is that I wonder why this is not a much bigger problem for opera if their browser is inserting ghost text into form inputs ..

Offline

#10 2012-09-20 10:47:57

etc
Developer
Registered: 2010-11-11
Posts: 3,418
Website

Re: extra words/characters in pages (random code)

Some external js could be interfering too. Have you tested it with js disabled? I am unable to reproduce this behavior after an hour or so of testing.

Offline

Board footer

Powered by FluxBB