Update:
When I look at the code with Firbug I see – inactive:
<a class="button" href="http://mystite.com/subfolder/members/member-name/messages/notices/delete/3/?_wpnonce=7b9fe1d26c" aria-label="Delete">x</a>
But this button is not accessible
Another update.
I found the “code” link in the following file: plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/messages/notices-loop.php
I changed the following code:
<a class="button" href="<?php bp_message_notice_delete_link(); ?>" class="confirm" aria-label="<?php esc_attr_e( "Delete Message", 'buddypress' ); ?>">x</a>
In this:
<a class="button" href="<?php bp_message_notice_delete_link(); ?>" class="confirm" title="<?php esc_attr_e( "Delete Message", "buddypress" ); ?>">x</a>
Now the “delete message” link is visible, however if I click on it I get an WP error message.
“Are you sure you want to do this?” – No Yes or No button but a link back to the messages with the text “try it again”
After a lot of digging here I found this:
bp_message_notice_delete_link uses wrong action for nonce generation
I made this change in the source code: fix nonce for sitewide notice deletion.
Changed in source code from this file /buddypress/bp-templates/bp-legacy/buddypress/members/single/messages/notices-loop.php
<a class="button" href="<?php bp_message_notice_delete_link(); ?>" class="confirm" aria-label="<?php esc_attr_e( "Delete Message", 'buddypress' ); ?>">x</a>
in this
<a class="button" href="<?php bp_message_notice_delete_link(); ?>" class="confirm" title="<?php esc_attr_e( "Delete Message", "buddypress" ); ?>">x</a>
Now I see the delete button and can delete messages, but this goes wrong again after an update from Buddypress.
I would like to receive an advice.
Thanks
Applying https://buddypress.trac.wordpress.org/changeset/11750 should fix the problem. Note that this change is in bp-messages/bp-messages-template.php, *not* notices-loop.php. There should be no need to reapply these changes after BuddyPress 3.0, where the fix will become part of the BP release.
Thanks a lot! That was the solution.
Regards.