- This topic has 15 replies, 3 voices, and was last updated 4 years ago by
Tom.
-
AuthorPosts
-
May 15, 2019 at 11:06 am #900500
Thomas
Hi there,
we have using the build in masonry support for a custom post type for a year now, but with one of the recent updates it stopped working.
All plugins, themes, etc are up to date.
Example URL for Admins: The column on the right side should be 3 columns in masonry mode.
Thanks in advance!
May 15, 2019 at 11:13 am #900517Leo
StaffCustomer SupportHi there,
Hmm something weird is happening on that page.
Any caching plugins or server cache?
If so can you try clear them first?
If not then can you quickly go through #1 here to eliminate any plugin conflicts:
https://docs.generatepress.com/article/debugging-tips/Let me know π
May 15, 2019 at 11:36 am #900560Thomas
Whats the weird thing? Looks good to me? See Screenshot here: https://screenshots.firefox.com/bpMjAToM4zFDgbjm/kupf.at
Thats what it should look like at the moment (sans the masonry for the right column).Ad debugging:
Deactivated all plugins, no difference.
WP Debug: No issues.
No white Screen, enough memory.
Ad theme: Well, its a custom theme template, so switching doesn’t work.
Ad Error log: nothing major.When I look through the other support questions, it seems like I’m not the only one with issues with masonry. I suppose its a degression in a recent update of gp.
May 15, 2019 at 11:37 am #900562Thomas
Oh, an no caching plugin, some serverside caching I think (but I have no access to it, and i never experienced problems with it).
May 15, 2019 at 11:52 am #900584Leo
StaffCustomer SupportLittle bit confused. Is the link you provided a single post?
That’s what the code is suggesting.
What code are you using to make it masonry?
What version are you upgrading from?
Any chance you can disable all plugins except GP Premium for us to have a look?
Might need setup a staging site if we need to do further debugging.
Thanks and We will get it sorted π
May 15, 2019 at 11:58 am #900591Thomas
Little bit confused. Is the link you provided a single post?
–> It is single view of the custom post type “zeitungsausgabe” which is linked to a number of posts of a different post type (called zeitungsartikel). As said, it worked like a charm until recentlyWhat code are you using to make it masonry?
function kupf_portfolio_masonry( $masonry ) { if ( is_singular( 'zeitungsausgabe' ) ) { return 'true'; } return $masonry; } add_filter( 'generate_blog_masonry','kupf_portfolio_masonry' ); function kupf_blog_page_columns( $columns ) { if ( is_singular( 'zeitungsausgabe' ) ) { return true; } return $columns; } add_filter( 'generate_blog_columns', 'kupf_blog_page_columns' ); function kupf_add_singular_post_classes( $classes ) { if ( get_post_type() == 'zeitungsartikel' && is_singular("zeitungsausgabe") ) { $classes[] = 'generate-columns'; $classes[] = 'tablet-grid-50'; $classes[] = 'mobile-grid-100'; $classes[] = 'grid-parent'; $classes[] = 'grid-33'; $classes[] = 'zeitungsausgabe-grid'; } return $classes; } add_filter( 'post_class', 'kupf_add_singular_post_classes' );
What version are you upgrading from?
We upgrade pretty frequently, but I can’t pinpoint it on a certain date, as it is possible that we didn’t catch it right away. But I’m pretty sure the problem popped up in the last few weeks.Any chance you can disable all plugins except GP Premium for us to have a look?
Nope, sorry. Its a production website with heavy traffic. And as said, I did test it, and it isn’t a conflict with another plugin.May 15, 2019 at 12:06 pm #900596Thomas
Ad date: Regarding to archive.org, it at least looked normal on 31.3.2019: https://web.archive.org/web/20190331172208/https://kupf.at/zeitung/166/
There are no newer captures though.So that means its an issue with the gp premium plugin, because the theme got last updated in january, right?
I could try to do a rollback with the plugin, but I don’t know how to access older versions. Maybe you can help me here?
May 15, 2019 at 12:08 pm #900599Leo
StaffCustomer SupportI’ve forwarded this to Tom.
He will get back to you π
Thanks for your patience!
May 15, 2019 at 12:09 pm #900600Thomas
Great, thanks!
May 15, 2019 at 12:17 pm #900610Tom
Lead DeveloperLead DeveloperAre you using this filter anywhere?:
generate_blog_get_column_count
It seems to be set to
3
instead of33
.May 15, 2019 at 12:20 pm #900614Thomas
Yeah, thats it!
Funny thing: I didn’t change it, it was set to 3 for the whole time. But I added the comment “Doesn’t seem to work”, so I excluded it above in my code listing =)So I suppose something got fixed with this filter in an update, leading to my code to kick in and, well, fail? =)
May 15, 2019 at 12:23 pm #900622Tom
Lead DeveloperLead DeveloperExactly – we fixed the bug in 1.8 π
May 15, 2019 at 12:23 pm #900623Thomas
Lol, see my old report: https://generatepress.com/forums/topic/allow-me-to-enable-masonry-on-single-templates/
Another little thing: I cant get the generate_blog_get_column_count filter to work. But it doesnβt seem to work β I have to set the setting in the options table.
=)
May 15, 2019 at 12:24 pm #900624Tom
Lead DeveloperLead DeveloperAh yes – all fixed! Glad it’s working now π
May 15, 2019 at 12:24 pm #900625Thomas
Thanks again, love your support!
-
AuthorPosts
- You must be logged in to reply to this topic.