Closed KirkwallDay closed 1 year ago
Was able to reproduce Reblog button not showing on front page
Apparently reblogging on non-single post views (index, archive) is disabled: 6786-wpcom has more information about it. I'll see if the blockers are still there and perform changes as needed.
The reason it was disabled was that the reblogging UI was not ready to work on pages with multiple posts.
In my tests, I:
Reblog
button...It worked fine. However, when I:
The reblogging form that open was related to the topmost post, not the second on the page.
We will need to adapt the reblogging UI script to achieve what we want here.
I will unassign this from me since I have more important things to do right now. Here's a WIP diff that re-enables the Reblog button on the index page: D82365-code
This is a bit complicated, and maybe it will expand, so I leave this for now However, those are my findings while working on this, in order to make life easier to the next person that will grab this:
widgets.wp.com/likes/master.html
<script type="text/javascript" src="<my-domain>/wp-content/js/likes-rest-nojquery.js?m=20220105"></script>
and remove /wp-content/js/likes-rest-nojquery.js?m=20220105
from the script that exists in the file.
Make sure you have your domain sandboxed
wp-content/mu-plugins/likes/queuehandler.js
// enable reblogs if we're on a single post page if ( document.body.classList.contains( 'single' ) ) { JetpackLikesPostMessage( { event: 'reblogsEnabled' }, window.frames[ 'likes-master' ] ); }
Note that this file is fusioned.
- The form that appears on reblog button click is located in the file `reblogging.php` (`wpr_reblog_form` function)
- We definitely need to check the display of the form. This is done in `wpr_load_ajax_js` function
- This code:
// Disable for non-single post views (index, archive). See #6786-wpcom.
if ( ! $is_singular ) {
$retval = false;
}
in `wpr_page_is_rebloggable` needs to be removed for the js to not blow up on pressing the reblog button in multi post pages.
- This ticket was originally opened 8y ago 6786-wpcom
- In the `master.html`, most probably, we need to add the `post_id` as a parameter to the template (It's available in `likes-rest-nojquery.js` file, so this is an easy thing to do)
- The "singular" (post) check is happening in several places inside `reblogging.php`, so we need to be careful about that. We need to check what the implications may be removing those lines from there.
- Check D82365-code to get some more context. It will help
Support References
This comment is automatically generated. Please do not edit it.
We landed a few fixes for this today:
This should be fixed! ⚒️
Quick summary
The reblog button will not show up on posts displayed on the latest posts page. This happens on Espied, Independent Publisher 2, and Twenty Twenty
Steps to reproduce
What you expected to happen
I was expecting to see all the sharing buttons including the reblog button.
What actually happened
Reblog button is missing, other sharing buttons including like are visible.
Context
Customer Report: 4936961-zen
Simple, Atomic or both?
Simple
Theme-specific issue?
Seems to occur on every theme. Here's the ones I tested:
Espied, TwentyTwenty, Independent Publisher
Browser, operating system and other notes
No response
Reproducibility
Consistent
Severity
Most (> 50%)
Available workarounds?
No but the platform is still usable
Workaround details
No response