As i saw this module totaly destroys the seo aspect of the content. It destroys the header tags. For example if i set H2 tag for the content this module will remove it. I hope i am wrong.

Comments

pjcdawkins’s picture

+1 it does remove heading tags, making them into <fieldset> <legend> elements.

pjcdawkins’s picture

Issue summary: View changes

text fix

dydave’s picture

Issue summary: View changes
Priority: Major » Normal
Related issues: +#2190961: Collapse Text and noscript
StatusFileSize
new118.81 KB

Hi guys,

Thanks a lot for posting this issue and I certainly wish it could have been answered or at least followed-up earlier.

Anyway.... hopefully we could take back from where it was left off.

I'm afraid I don't really understand what you guys meant by:

It destroys the header tags. For example if i set H2 tag for the content this module will remove it. I hope i am wrong.

and

it does remove heading tags, making them into elements.

From what I have tested, non of the HTML markup inside the collapsible markup, i.e. [collapse ...]... inside markup ... [/collapse], would be affected in any way.
If a collapsible fieldset contains any HTML markup, whether h1, h2, h3, etc... none of it should be altered when displayed.

For example, see a quick screenshot below, with several types of tags in a collapsible fieldset (Theme: Bartik):

Therefore, could you please be as specific as possible about your request and what could be wrong with the way the Collapse Text module currently handles collapsible fieldsets' markup?
Any of the following would be greatly appreciated:

  • Screenshots
  • Copy/paste/dump of the HTML code with your comments about what is good or bad
  • Suggested solution that you would ideally envision
  • Some examples of the collapse_text markup that you used and for which heading tags were removed and replaced with elements
  • Anything else that could help describing the problem

This surely looked like a rather annoying issue since its priority was set to Major, so I would be glad to further discuss and help finding out an appropriate way the problem could be resolved.

Feel free to let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on this comment or bug report in general, I would be glad to provide more information or explain in more details.

Thanks in advance to everyone for your reviews, testing, comments and feedbacks.
Cheers!

mibfire’s picture

I have just tested on simpletest and it is still not working.

Try this:

[collapse]
<h2>gfgfggf</h2>
Vivamus pretium pretium tellus, eu mattis libero tempus sit amet. Nulla facilisi. Nulla turpis felis, egestas ac tortor sit amet, rhoncus vulputate dolor. Ut augue metus, commodo a mollis at, ullamcorper eget elit. Vivamus consequat purus eu nulla eleifend condimentum? Aliquam ultrices venenatis augue, et luctus mauris ultrices ultricies! Integer eu luctus ante, non euismod purus! Integer lacinia mi eget posuere eleifend? Integer placerat ligula aliquet metus scelerisque imperdiet. Quisque pellentesque, leo eget pellentesque vulputate, justo ipsum interdum enim; non rhoncus purus massa non sem. Morbi placerat nisl sem, non ullamcorper sapien suscipit sit amet! Duis et massa bibendum, laoreet ipsum at, pretium nunc. In feugiat tincidunt lectus id hendrerit.

Nullam aliquet fermentum sollicitudin. Nam vel purus at sapien eleifend bibendum. Proin viverra lacinia vestibulum. Nullam ultrices rhoncus erat id volutpat. Nam ac nisl quis metus commodo semper a id justo. Praesent eu dui erat. Proin sed congue eros. Donec ornare mauris ut magna ullamcorper varius. Nullam sollicitudin eleifend lectus gravida pellentesque. Donec consectetur ut ipsum in congue. Sed egestas risus eget libero metus.
[/collapse]

H2 will be removed.

dydave’s picture

Category: Bug report » Feature request

Hi @mibfire,

Thanks a lot for your prompt follow-up on this issue and I'm glad to see we might be able to bring back some life and discussion to this issue.

Thank you for providing an example of what you meant could potentially be an issue.

Now, I would be glad to hear any potential ideas of how this could be resolved and what could be possible solutions.

Please allow me to get back to the example you gave:

[collapse]
<h2>gfgfggf</h2>
Vivamus pretium pretium tellus, ....
[/collapse]
H2 will be removed.

Then, I would assume you would like the H2 tag to be conserved (if I am not mistaken).
But could you please describe in detail the HTML structure that you would expect to be generated?
Right now collapsible text is contained by <fieldset> markup/tags, how would you see exactly this HTML structure evolve?

Currently the HTML markup generated is:

<fieldset class="some-classes">
  <legend>Heading text</legend>
  <div class="fieldset-wrapper">
    <div class="collapse-text-text">Some text
    </div>
  </div>
</fieldset>

Would I be correct to assume you would like the following markup to be generated?

<fieldset class="some-classes">
  <h2>Heading text</h2>
  <div class="fieldset-wrapper">
    <div class="collapse-text-text">Some text
    </div>
  </div>
</fieldset>

If we were to follow this logic, what would happen with the following piece of code:

[collapse]
<h2>gfgfggf</h2>
Vivamus pretium pretium tellus, ....
<h3>gfgfggf</h3>
Vivamus pretium pretium tellus, ....
[/collapse]

In particular, what would happen with the H3 tag?

This issue actually sounds like a substantial Feature request and would probably require many code changes, discussions as well as testing.

In order to move this issue forward, we would need to clearly identify on both sides, the parameters and expected result:
collapse_text syntax+HTML markup => expected result for the generated HTML structure

Any additional help, comments, ideas, feedback, questions, issues, objections, suggestions or concerns would definitely be greatly appreciated.

Thanks in advance to everyone for your comments and feedbacks.
Cheers!

mibfire’s picture

Hi @DYdave

This issue will be harder than i thought.

If we wanna do a perfect html5 friendly solution then we have to rewrite the whole template. The fieldset elem is not appropriate either. We should use the section elem. The section elem needs to start with a header elem. If there is no header tag in the text then, the header could be the title tag of collapse, or the first setence of the text and in this case the default header tag should be given in the collapse elem like title.

dydave’s picture

Status: Active » Closed (outdated)

Drupal 7 is not supported anymore, therefore this issue is unlikely to go any further.

Additionally: No activity or reply for more than 10 years.

If this issue is still valid for more recent versions of the module and Drupal core, please create a new ticket with the appropriate version.

Marking issue as Closed (outdated), for now.

Thanks everyone for your interest in the Collapse Text module and contributions! 😊

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.