Hello Drupal Experts,
I am somewhat a newbie to Drupal. I have just upgraded my site (currently it is on a test server) from v4.7.3 to v6.1. I didn't do it in a big jump to v6.1, I did it in small steps like; 4.7.3 --> 4.7.11 --> 5.0 -->5.1 --> 5.7 --> 6.0 -->6.1
After the upgrade everything is fine except for some of the nodes where I have html comments like this "
" (without the quotes) would get rendered when you view the page. On any older versions of Drupal from 4.73 to 5.7 the html comments would not get rendered to the web browser at all, but it does in v6.x
Does anyone know how I may resolve this? I think what's happening here is that Drupal thinks that my html comment is part of the content and that's why it is rendering that to the web browser.
Thanks,
John
Comments
...
could it be related to the issue at http://drupal.org/node/222926?
HTML Comment renders on page/node
Hi TM,
Thanks. I tried it and it works where I put a " </!-- " the beginning tag does not render to the browser but the " --> " closing tag still renders to the web browser. How do I do the same for the closing tag? Thanks again....
just tried on a scratch
just tried on a scratch local install, and
<!--comment text-->disappears, in filtered html. this is hand-typed; have you tried going in to edit/resubmit a node?HTML Comment renders on page/node
Hi TM,
My "Input Format" for my pages/nodes are "Full HTML". I have tried editing the node and re-submitting the node and it still render the " --> " closing tag. Thanks to your link I also found this http://drupal.org/node/97182 and according to #4 by jcfiala, he posted a patch that would fix this. Do you know how to apply these so called "patch"? I have no idea how to do this.
My test server is a Windows 2003.
Thanks again.........
...
http://drupal.org/patch
sorry, just tried it on another local install; still works. have you tried a new test node?
HTML Comment renders on page/node
Hi TM,
I tried it on a new node and it does work on a single line comment, however, what I need commented out is a small table with 2 rows that I just want for safe keeping incase I need to use it in the future. Somehow it still renders the table that I want to comment out and the closing " --> " still renders on the web page.
...
betcha it has to do with all those other tags being enclosed...was never able to to it in d5 either, come to think of it.
guessing that "comments" is supposed to be for documentation only, not excising sections of html...are you going to add a comment to the current issue?
well, in any case, good luck!
HTML Comment renders on page/node
Hi TM,
Thanks so much for all your help even though, I still haven't got it resolve yet. It is driving me nuts as I can't seem to go forward with this with my production site that I want to upgrade to the current release of Drupal. This issue where the html comment " < !-- " and " -- > " displays is holding me back. I have numerous nodes that have html comments on them, I guess one way to do it is just remove the commented content section out.
I don't understand what you mean by "Are you going to add a comment to the current issue?" I guess if any of the Drupal moderators/developer are reading this post, I am in desperate need of your expertise and again, I am a newbie..................
Thanks again...........
....
hardly an expert
the people that build and maintain drupal and the modules watch the issue queues first, the forums second (or when their heads come up for air), because that is where the "bugs" are supposed to be reported. the forums are for the help/howto stuff. working this out in the issue queue may help you resolve this problem quicker, and contributes to the community at the same time if properly handled. see the support tab at the top of this site for additional info.
short of an immediate resolution, it looks like you will have to take your commented text out. i can only suggest that you have an archive somewhere to put your commented text (maybe with a node number as a key), or maybe stuck in a comment on that node. i am not versed enough in the node structure to tell you if there is a way to hide content from non-admins.
i actually think this kind of stuff is important to keep around, somewhere, but remember that commented text might still be rendered in the page source.
good luck
In the absence of a proper
In the absence of a proper fix yet for Drupal 6.x, the easiest workaround might be to remove the htmlcorrector filter from your Full HTML input format (or create a new Full HTML without htmlcorrector input format) for the time being. Although htmlcorrector exists as a contributed module in 5.x, it was only in 6.0 that it was included in core (so you are not losing anything compared with your 4.7.x or 5.x installs if you remove htmlcorrector).
Hopefully someone will have time soon to do fix this soon. It's not too difficult a bug, just slightly fiddly to get right.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
Remove HTMLCorrector Filter
Hi GPK,
Thanks for the suggestion, but I don't understand what you mean by "the easiest workaround might be to remove the htmlcorrector filter from your Full HTML input format". Please excuse me for being a bit remedial. Do you mean to delete/remove the "filter" sub-directory inside the "modules" directory?
Thanks again,
John
No, I'm suggesting a purely
No, I'm suggesting merely a (temporary) change to the configuration on your site. Go to admin/settings/filters (i.e. admin -> settings -> input formats), hit the "configure" option for Full HTML, uncheck the HTML corrector option under "Filters", then hit Save configuration.
Once the bug is fixed (in Drupal 6.2 I hope but may not be till a later version) you can then upgrade your installation and re-enable the HTML corrector filter to take advantage of its functionality.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
HTML Corrector
Hi GPK,
Thanks for the response and the suggestion, I found it and made the change and that works. Are there any side effects to this in unchecking the HTML corrector? Many thanks again for your help.
How's the weather in London today? I like your site, very nice and clean...........
Regards,
John
HTML corrector is a new
HTML corrector is a new feature in 6.x so you've managed without it in the past ... can be useful to fix certain HTML errors if the content you enter contains invalid HTML (bascially it closes tags left open and such-like). Also can fix problems caused by teasers being truncated to the middle of HTML elements.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
Alternative work-around
I went to turn off the html corrector to solve this problem but decided to have one more try at resolving the end comment tag.
Tried: </!--my comment text-- >
I.e. a '/' after the '<' and a ' ' (space) after the end comment '--' and before the '>'.
A bit inconvenient but an alternative work-around.
Try
Try http://drupal.org/project/htmlcomment
FVS - https://dmarcpal.com - https://send2t.com
htmlcomment works
I had the same problem. Both solutions mentioned above work. But I will be using htmlcomment as I dont want to loose the features of htmlcorrector in the future.
Cheers
Drupal not smart enough to identify comments...
I couldn't believe Drupal behaves this way! Drupal just converts everything to html entities, so they get displayed:
1. Either include a "Keep HTML comments hidden" checkbox, or
2. Default to simply not HTML entity encoding HTML comments
I'm new to Drupal and I really thought that these types of issues would have been resolved in the early versions, likewise the ability to simply 'duplicate' a page - I thought this would be core version 1 stuff!
One rediculous work around is to specify the content type as "php" and surround the content you want to hide in with:
Obviously, this will not 'comment' the content on the webpage, but completely remove it. Drupal would be an awesome CMS if it actually managed content ;-)