Extension talk:CollapsibleSections

About this board

v1.39 Unable to collapse all headings under h2

11
Blyatman9000 (talkcontribs)

I have a desktop page with several h2 headings, and with several h3 headings under each of the h2 headings. When I collapse the h2 heading, it ONLY collapses the text up until the h3 heading.

In the example below, when I try to collapse Heading 2.1, it only collapses "Text2.1", but everything after this remains uncollapsed. Is there a way for me to set it up such that when I collapse Heading 2.1, it will collapse everything up until Heading 2.2?

I used the following settings:

wfLoadExtension( 'CollapsibleSections' );

$wgCollapsibleSectionsCollapsedByDefault = true;

$wgCollapsibleSectionsEnableDesktop = true;

Heading 2.1

Text2.1

Heading 3.1

Text3.1

Heading 2.2

Elcapitan68 (talkcontribs)

Thank you for reporting the issue @Blyatman9000. I believe the extension is supposed to work as you expected and it does work as expected on MW 1.39 as I can see on my test installation. Please, note that official compatibility policy of the extension is LTS. Anyway, please let me know what skin you use (vector, vector-2022 or something else). Can you share the exact wiki markup you use? So that I could try to reproduce the issue on 1.40. The version of the CollapsibleSections will also help.

Blyatman9000 (talkcontribs)

Hi @Elcapitan68, I am using the following:

- MW 1.39.3

- vector-2022 skin

- CollapsibleSections 1.40.


wiki markup:

== Heading 2.1 ==
Text2.1

=== Heading 3.1 ===
Text3.1

== Heading 2.2 ==

Screenshot of issue: https://ibb.co/BGyYFhx

I also noticed that I sometimes need to bypass the browser's cache to see the changes. In addition, some of the h2 headings do not have the collapsible arrow next to them (screenshot: https://ibb.co/jvqsgJ2).

Elcapitan68 (talkcontribs)

@Blyatman9000, I guess you are supposed to use the version that matches the version of the core (1.39). Can you please downgrade the CollapsibleSections to 1.39 (REL1_39 branch if you use git) and repeat checking?

Blyatman9000 (talkcontribs)

@Elcapitan68, I downgraded to 1.39 but the issue persists.

Elcapitan68 (talkcontribs)

@Blyatman9000 Thank you for your patience and collaboration. The issue is confirmed. Fixing ... Will update you ASAP.

Elcapitan68 (talkcontribs)
Blyatman9000 (talkcontribs)

@Elcapitan68 thanks for the update. Can a comment be posted here once a fix has been implemented?

Elcapitan68 (talkcontribs)
Tosfos (talkcontribs)

We have a patch in review for this.

Reply to "v1.39 Unable to collapse all headings under h2"
Summary by Tosfos

Resolved by back-porting patches to supported branches

97.68.215.174 (talkcontribs)

Error: Syntax error, unrecognized expression: unsupported pseudo: heading

I receive this error on every page with <h2> headers.

$wgCollapsibleSectionsEnableDesktop = true; - this is set.

Nothing is collapsible. Any suggestions?

97.68.215.174 (talkcontribs)

WikiMedia 1.35.1

Tosfos (talkcontribs)

Which version of the extension are you using?

51.6.65.80 (talkcontribs)

Thank you so much for creating this extension, it seems to be the best solution so far.

I have run into a problem though, which is that the last header that is collapsible will collapse all other headers into it.

Eg. I want to collapse h5's, meaning that every element that is sub-h5 level should collapse (h6 and p elements). Instead, the extension will collapse everything under the h5, even if there is an h2 coming. This makes it practically unusable for anything other than h2s. Any thoughts on how to fix this? Thanks

Tosfos (talkcontribs)

Thank you for the kind words. I'm not so clear on what you're attempting to do. And is it only the last heading that's the issue, but the other headings work as expected? It sounds like you might want to set:

$wgCollapsibleSectionsTag = 'h5';

If I'm off base here, please post any configuration for this extension from your LocalSettings.

51.6.65.80 (talkcontribs)

@Tosfos, thank you for the quick reply.

I believe my LocalSettings are set correctly:


wfLoadExtension( 'CollapsibleSections' );

$wgCollapsibleSectionsEnableDesktop = TRUE;

$wgCollapsibleSectionsTag = h5;


To explain it again, let's say my page looks like this:


<body>

    <h2>

        <h5>

            <p></p>

        </h5>

        <h5>

            <p></p>

        </h5>

    </h2>

    <h2>

        <p></p>

    </h2>

</body>


The h5s are collapsible. The first h5 collapses correctly. When I collapse the second one, I would expect only the <p> to collapse, but instead it collapses the next h2 into it too. I hope that makes sense, and I hope it can be fixed.

Tosfos (talkcontribs)

Can you check which version of the extension and which version of MediaWiki you are using? By the way, you should put quotes around 'h5', but it won't make much of a difference for this issue.

51.6.65.80 (talkcontribs)

I´m using Mediawiki 1.36.1, and extension version 0.01 for MW 1.36.

I added the quotes, thank you.

Tosfos (talkcontribs)

We'll see if we can reproduce the issue. Feel free to ping me if you don't hear from me soon.

Tosfos (talkcontribs)

Noting that we are researching this now.

Tosfos (talkcontribs)

The issue should be fixed now. Please note that this extension only officially supports LTS versions of MediaWiki, but it likely is compatible with 1.36.


Please test and mark as resolved.

There are no older topics