Forum Replies Created
-
AuthorPosts
-
philip29
ParticipantHappy to help sort it out. Thanks for the assist and for the great plugin
philip29
ParticipantI think we may have stumbled onto the cause.
We have four ASP searches. Two are constrained to 200px width. Two were set to default width (no width specified) which resulted in 100% width. Before the recent ASP updates, the widths of the different ASP searches were respected. After the update, the width of the 200px search appears to have been set globally via .asp_w_container{width:200px}, causing all four ASP searches to be constrained to 200px.
I’m guessing the old code properly constrained the CSS settings to each ASP search, but the new code inadvertently broke the constraints. The way to test would be to create a site/page with multiple searches, set to different sizes.
philip29
ParticipantHello. Sorry for the late follow up, and happy new year.
Digging further into the code, the issue is definitely caused by ASP generating a CSS class:
.asp_w_container{width:200px}Inspecting the elements in Chrome reveals the normal 100% width is being overridden by this CSS statement.
We don’t have any ASP search fields set to that dimension, and the search field used to be fine prior to 4.21.7, so there must be something going on in ASP.
For now we have resolved the issue by adding custom CSS via the ASP Custom CSS field:
.asp_w_container { width: 100%!important; }Thanks
-
This reply was modified 4 years, 4 months ago by
philip29.
August 18, 2020 at 11:36 pm in reply to: Filter search results based on authentication status #29040philip29
ParticipantThank you, Ernest. Unfortunately it is still not working. I believe I’ve found a different way to address the issue: multiple ASP search forms, each with different constraints and conditionally displayed based on login status.
philip29
ParticipantHe Ernest
MemberPress support suggested trying
MeprRule::is_locked($r)function asp_fix_groups_exclusions($results) { // Group based exclusions if ( class_exists('MeprRule') ) { foreach ($results as $k => &$r) { if ( isset($r->post_type) && MeprRule::is_locked($r) ) unset($results[$k]); } } return $results; } add_filter('asp_results', 'asp_fix_groups_exclusions', 10, 1);This had no effect, all results were returned to all users. Do you see any issues with the code? This was placed in a child theme’s functions.php.
Thanks
-
This reply was modified 4 years, 4 months ago by
-
AuthorPosts