Page MenuHomePhabricator

Prevent Start a discussion about from showing on certain pages
Closed, ResolvedPublicBUG REPORT

Description

Closely related to T249293 and reported there also.

Please prevent also Start a discussion about from appearing on inappropriate pages.

See this one with activated DT mode – I want visitors to follow the redirect towards the central collecting page, not to Start a discussion about right here.

The page is equipped with __NONEWSECTIONLINK__ which prevents from classic insertions.

Event Timeline

I don't see the "Start a discussion about…" box on that page, does one appear for you?

image.png (2×3 px, 404 KB)

__NONEWSECTIONLINK__ should work to suppress it.

The box shows up on redirect pages at the moment (e.g. https://en.wikipedia.org/w/index.php?title=Talk:Cats&redirect=no), this is an already known bug and fixed after it was reported here: T312599#8110947 (the fix will be deployed later this week).

image.png (2×3 px, 362 KB)

See also some related discussions:

It does appear for me, otherwise I would not have opened this issue.

It is not a redirect page, but a soft redirect diverting to another wiki.

I am afraid of survey pages. We have quite a lot of archive surveys in talk spaces, with no content nor section but a list that tells /archive1 is from 2004 til 2007 and /archive2 is from 2008 til 2011 etc. Those /archive pages must not invite to start a discussion nor adding sections, and they do not contain any headline yet.

I am not happy with hacky solutions, like invisible dummy headlines or dummy signatures nor unbalanced display:none elements.

BTW, on talk archive pages there is usually no subject page on /archive. If this is a talk page and the subject page does not exist it is most probably an archive subpage, and no section may be added nor anything starting, since only the root talk page owns a root subject page. If the subject page does not exist nobody should be invited to start talking about nothing.

Also doesn't show for me. The new topic buttons should not show on any pages with __NONEWSECTIONLINK__ such as this one. Do you have any gadgets enabled that could be causing this? What happens if you load the page in safemode (https://www.mediawiki.org/wiki/Manual:Safemode)?

https://en.wikipedia.org/wiki/Wikipedia_talk:Sandbox/Archive_Overview

  • There is no subject page. Do not invite to start a discussion about nothing.

https://www.mediawiki.org/wiki/Project_talk:Sandbox/archives

  • Should not offer to start a new topic.

I swear that I have seen that during process of creating https://en.wikipedia.org/wiki/User:PerfektesChaos/js/refNames

  • Otherwise I would not have opened this issue.
  • I guess the page properties are taken via API. If a page is under creation, there are no page properties yet and cannot be examined for NONEWSECTIONLINK nor any local translation.
  • Now it vanished for me as well.

If you succeed in confusing me, you will confuse everybody. I am the wise guy.

  • While pages are in creating, nothing should be triggered.
  • If there is no corresponding subject page, nothing should be triggered.

I could not reproduce all these preferences and I am very short in time for detailed exploration.

Was thinking about merging to T249293, but there could be use cases where this isn't desirable, but reply link still is.

Hackaround from enwiki, use a template that fakes a hidden signature on the page (e.g. https://en.wikipedia.org/wiki/Template:No_discussion_tools_empty_state)

Bit of confusion, is it (newly?) expected that NONEWSECTIONLINK will suppress the empty state new topic tool, but that this may be reverresed in T312599?

The __NONEWSECTIONLINK__ magic word is, and has always been, the supported way to remove that message. You don't need any hacks unless you're for some weird reason trying to remove the message without removing the tab.

The only question is why it didn't work for @PerfektesChaos when they tried it.

Thanks matmarex, this does indeed appear to be working properly (NONEWSECTINLINK stops this from running) - barring an example that can show it not working now, this can prob be closed as unable to duplicate. I'm pretty sure I saw this not working somewhere, but when I looked again it was fine - so possible caching delay maybe.

On second thought, "remove the message without removing the tab" was the use case; for pages with fancy layouts or custom controls, the message presentation may be undesirable, a problem that the standard "new section" editing control doesn't have.

https://en.wikipedia.org/wiki/Wikipedia_talk:Sandbox/Archive_Overview

  • There is no subject page. Do not invite to start a discussion about nothing.

Reported as T288319: "Start a discussion" empty state message should not appear on empty talk pages when corresponding page (or user) doesn't exist

https://www.mediawiki.org/wiki/Project_talk:Sandbox/archives

  • Should not offer to start a new topic.

Reported as T312560: Non-existent talk page archives should not have "start a discussion" button

(Note that the page you linked to is a Flow page, not a normal talk page where DiscussionTools are active. The issue in present in DiscussionTools too though, and the task I linked is about DiscussionTools' behavior. If you think there's any chance whatsoever that anyone will make this change in Flow as well, file a separate task please.)

I swear that I have seen that during process of creating https://en.wikipedia.org/wiki/User:PerfektesChaos/js/refNames

  • Otherwise I would not have opened this issue.
  • I guess the page properties are taken via API. If a page is under creation, there are no page properties yet and cannot be examined for NONEWSECTIONLINK nor any local translation.
  • Now it vanished for me as well.

If you succeed in confusing me, you will confuse everybody. I am the wise guy.

  • While pages are in creating, nothing should be triggered.
  • If there is no corresponding subject page, nothing should be triggered.

I could not reproduce all these preferences and I am very short in time for detailed exploration.

Fair enough, I believe you and thanks for reporting it.

So, the best guess is that it appeared while you were previewing the page? It is possible that it was broken as you describe at some point. The "Start a discussion…" message should never appear while previewing now, since as of T309423, we consider it to be an "interactive" element (like the [reply] and [subscribe] links) and hide it in previews.

matmarex claimed this task.

I think there is nothing else to do here. __NONEWSECTIONLINK__ should work if the page exists, and I also proposed fixes for the default behavior for pages that don't exist described in T288319/T312560. (I'm hoping that no one has reservations about it, and that we can get this resolved soon. If there's anything to discuss, let's continue in those tasks.)

If you can still reproduce the issue, or if I missed anything in my summary, please re-open.