Attempting to bookmark a moderator-removed comment returns "You are not permitted to view the requested resource."

AI-generated summary

A user reports an issue where attempting to bookmark a moderator-removed comment results in a “You are not permitted to view the requested resource” error. The post includes a detailed HTML snippet from the page, showing the bookmark button (with ID ember38) and the error message. Another user, Moin, notes that this issue was previously discussed in January, suggesting it might be a duplicate. rokejulianlockhart asks whether the thread should be closed as a duplicate. Moin and rokejulianlockhart are involved in the discussion.

When I select //*[@id="ember38"] at discussion.fedoraproject.org/t/173585/35:

<button class="btn no-text btn-icon fk-d-menu__trigger bookmark-menu-trigger post-action-menu__bookmark btn-flat bookmark widget-button bookmark-menu__trigger btn-icon no-text" aria-expanded="false" title="bookmark this post" data-identifier="bookmark-menu" data-trigger="" type="button" id="ember38">
<svg class="fa d-icon d-icon-bookmark svg-icon svg-string" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="#bookmark"></use></svg>      <span aria-hidden="true">
          ​
        </span>
<!---->    
    </button>

…I see:

An error occurred: You are not permitted to view the requested resource.

The ECMAScript console returns:

12:24:12.798 XHRPOST
https://discussion.fedoraproject.org/bookmarks.json
[HTTP/2 403  160ms]

12:24:04.683 Uncaught (in promise) TypeError: can't access property "saveData", e is undefined
    create bookmark-api.js:20
    create post-bookmark-manager.js:36
    onBookmark bookmark-menu.gjs:124
    onShowMenu bookmark-menu.gjs:147
    show float-kit-instance.js:28
    show d-menu-instance.js:101
    onTrigger d-menu-instance.js:136
    onClick d-menu-instance.js:120
bookmark-api.js:20:7

Instead, it should be hidden, or (perhaps, better yet), disabled.

I suggested hiding the bookmark icon in that case in January:

2 Likes

@Moin, should this be closed as a duplicate of it, then (or the other way around)?

A post was merged into an existing topic: Hide bookmark from post menu on hidden posts