Skip to:
Content

Opened 4 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#7669 closed defect (bug) (fixed)

Impossible to delete site-wide notices

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

Description

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
4 weeks 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
4 weeks 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
4 weeks ago

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

#4 follow-up: @hnla
4 weeks 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
4 weeks 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
4 weeks ago

The rules originated back in the first pass at implementing a companion stylesheet: https://buddypress.trac.wordpress.org/ticket/6291#comment:40

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
4 weeks 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
4 weeks 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 4 weeks ago by DJPaul (previous) (diff)

#9 @djpaul
4 weeks 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.