Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[publishpress_authors_box] shortcode displaying same authors in Full-Site Editing #1191

Open
stevejburge opened this issue Jan 19, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@stevejburge
Copy link
Member

Shortcodes like this aren't working correctly in Full-Site Editing archives

Here's a homepage template:
[publishpress_authors_box layout="boxed" archive="true"]

Screen Shot 2023-01-19 at 11 51 31 AM

Here's the end result - no information and no active links
Screen Shot 2023-01-19 at 11 52 25 AM

@stevejburge stevejburge added the bug Something isn't working label Jan 19, 2023
@stevejburge stevejburge added this to the 4.1.2: Bug Fixes milestone Jan 19, 2023
@ojopaul
Copy link
Collaborator

ojopaul commented Jan 25, 2023

@stevejburge Can you give more information on how to test this?

  1. Does the homepage template uses a page with an Author?
  2. Is Homepage an archive page? My reasons is because you're using archive="true" parameter
  3. What exactly are you trying to achieve with the edit and usage on the page since the shortcode is for getting an Author Box output for archive page or post in loop and if you're trying to use it in post loop, I'm wondering why you'll use "boxed" layout?

We may have some compatibility issue but i'm trying to understand the use case here to know what the issue may be but as far as I know, here's what may be wrong so far:

  • There's no author data because you set archive="true" and the page is not an archive page
  • The box is repetitive because you placed it in a post loop (outputting new box below each post)
  • The layout is not looking nice cos boxed layout wasn't created for the use case, other layouts like 'inline' etc will fit in better but if you really want to use boxed layout, then modify it corresponding Author Box to remove "Author" title and reduce box width since available area is small or reduce the list grid number to give much needed width for the box

If the issue is addressed, what's the main compatibility issue we're trying to fix?

@ojopaul
Copy link
Collaborator

ojopaul commented Jan 25, 2023

Update: The main issue now is same authors been displayed for all posts in FSE theme

@ojopaul ojopaul changed the title Issue with Archive Pages on Full-Site Editing [publishpress_authors_box] shortcode displaying same authors in Full-Site Editing Jan 25, 2023
@ojopaul
Copy link
Collaborator

ojopaul commented Jan 26, 2023

I deactivated all plugins on my testing site including Authors when no positive result in my testing and after that, i create a new simple plugin with a new shortcode to get post ID in loop and realised it’s showing same post ID for all the posts which shows this is not Authors issue but probably the shortcode is not been executed inside the block loop or the block is not resetting queries.

@ojopaul ojopaul removed this from the 4.1.2: Bug Fixes milestone Jan 26, 2023
@stevejburge
Copy link
Member Author

This is related to an issue in FSE: WordPress/gutenberg#43053. We'll follow that issue for updates.

@stevejburge stevejburge added this to the 4.2.1: Bug Fixes milestone Aug 15, 2023
@stevejburge
Copy link
Member Author

@ojopaul Can we take another look at this after 6.2 and 6.3 have now been released?

@ojopaul
Copy link
Collaborator

ojopaul commented Aug 25, 2023

@stevejburge This will start working automatically when the condition changes and nothing needed to be done from our end.

@stevejburge stevejburge removed this from the 4.2.1: Bug Fixes milestone Sep 12, 2023
@stevejburge stevejburge added this to the 4.3.0: Author Categories milestone Sep 22, 2023
@ojopaul ojopaul removed this from the 4.3.0: Author Categories milestone Nov 6, 2023
@ojopaul
Copy link
Collaborator

ojopaul commented Jan 24, 2024

The problem is from Gutenberg and there's an opened issue on it.
WordPress/gutenberg#43053

In my test, I deactivated all plugins on my testing site including Authors when no positive result in my testing and after that, i create a new simple plugin with a new shortcode to get post ID in loop and realised it’s showing same post ID for all the posts which shows this is not Authors issue but probably the shortcode is not been executed inside the block loop or the block is not resetting queries.

The proposed workaround cannot work for us because we're not rendering the shortcode. I think we'll be on the lookout till this is fixed

@stevejburge
Copy link
Member Author

That thread points to this plugin as a possible solution: https://wordpress.org/plugins/display-a-meta-field-as-block/

@ojopaul
Copy link
Collaborator

ojopaul commented May 20, 2024

I'm leaving this here incase the conversation come up again so I don't have to be digging up how again.

The plugin linked to provide a UI to insert the shortcode which gives them control over it and after that, wrap the shortcode again to solve the issue and in the case of Authors, we're not providing additional UI to enter shortcode other than user entering the shortcode in their content directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants