Skip to:

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#7669 closed defect (bug) (fixed)

Impossible to delete site-wide notices

Reported by: antonioeatgoat's profile antonioeatgoat Owned by: djpaul's profile djpaul
Milestone: 3.0 Priority: low
Severity: minor Version:
Component: Messages Keywords: dev-feedback


I've just realized that all the default WordPress themes hide the link to delete site-wide notices with a text indentation, in Profile > Notices.

From Twenty Seventeen:

.bp-user #buddypress #message-threads.sitewide-notices td:last-child a:last-child {
    line-height: 0;
    margin-left: .7em;
    text-indent: -999em;

The CSS seems quite specific, so I don't think it's hided by mistake. In addition, if you force the link to be displayed, it doesn't work anyway. It redirects you to the ugly error page "Are you sure you want to do this?".

What's the point for BuddyPress to render a button that doesn't work and that themes need to hide via CSS?

P.S.: If this is clear for others because it has been explained/discussed somewhere else, I ask sorry in advance.

Change History (10)

#1 @DJPaul
6 years ago

  • Milestone changed from Awaiting Review to Under Consideration

I think we've recently fixed that delete option -- I can't remember without testing on trunk.

As to why this CSS exists -- @hnla, this exists in the Legacy twenty* compatibility stylesheets, which you worked on. Why does it exist? :)

#2 @hnla
6 years ago

Doubtless there was a reason, I would have to set up a test case and review situation to be able to provide an answer though, I'll attempt to clarify when I have a free moment.

#3 @DJPaul
6 years ago

I propose to take that CSS out because it's hiding functionality, which we should never have done.

#4 follow-up: @hnla
6 years ago

Clearly we did so for a reason - I wasn't directly responsible for this so a little hazy as to exactly why although I think there is likely a discussion ticket somewhere that explains our reasoning iirc.

A few facts though.

  1. This CSS hides the anchor and icon for the delete link but leaves the 'activate/deactivate' links in place, from this screen we don't delete only activate or deactivate a message - it seems that logic dictates or suggests if we can deactivate or re-activate then deleting is a bit of a contradiction I guess we thought the point of screen was to display ALL notices allowing option to review and re-activate.
  1. If I re-enable that link it does delete the notice, it does NOT throw an error, so likely this is a facet of the users install at the time.
  1. Always look to the scss sheet as there are often comments as to why something is actioned ( scss allows comments that don't clutter the compiled stylesheet & thus can be more verbose)

I guess we should really look for the ticket where this action was decided on ( if I'm right that one exists) then decide whether we should re-instate the link.

#5 @hnla
6 years ago

#6710 has reference to this issue in part - at least I mention having to port missed styles over from... to twentysixteen, still not 100% sure why we needed to hide.

#6 @hnla
6 years ago

The rules originated back in the first pass at implementing a companion stylesheet:

Looks as though we had a subsequent event where we changed delete link or rather added 'deactivate' into the mix & somehow we mismanaged the elements inadvertently?

Sherlock will have to leave it there for the moment as has things to get on with, we'll circle around another time to think about best solution that doesn't upset layouts.

#7 in reply to: ↑ 4 @antonioeatgoat
6 years ago

Replying to hnla:

  1. If I re-enable that link it does delete the notice, it does NOT throw an error, so likely this is a facet of the users install at the time.

That's strange, I tried with both WordPress 4.9.2 and 5.0-alpha (fresh installation) and I can experience the issue with many themes, both mine or default WordPress themes. The same for some users of my theme.

Maybe something with the server? There isn't any error in the log file and the PHP Memory Limit should be enough. Anything else I can have a look?

#8 @DJPaul
6 years ago

  • Milestone changed from Under Consideration to 3.0

The button is broken in 2.9 (and older), but fixed in 3.0-master. See r11750

Last edited 6 years ago by DJPaul (previous) (diff)

#9 @djpaul
6 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11826:

Messages, Templates, Legacy: fix sitewide notification "delete" link.

This was hidden in the twenty* compat. stylesheets, and had an untranslatable "x" as the link text.
This link was broken until very recently, see r11750.

Fixes #7669

Props antonioeatgoat for the suggested fix, and hnla for investigation.

Note: See TracTickets for help on using tickets.