dastra
Forum Replies Created
-
Forum: Plugins
In reply to: [Private Content] Whitespace after upgrade to wordpress 5.70Thanks very much Aldo; I will bear that in mind in the future. And thanks for your prompt replies!
- This reply was modified 3 years, 11 months ago by dastra.
Forum: Plugins
In reply to: [Private Content] Whitespace after upgrade to wordpress 5.70Hi Aldo,
I think I know why – I’m using the visual editor for the whole thing (as often the content which I wish to make private is quite a few different blocks). In the visual editor, the code above looks like this:
https://drive.google.com/file/d/1gvCUinf0KgZd0cp8fqCFU8LNZdIGffxp/view?usp=sharing
Forum: Plugins
In reply to: [Private Content] Whitespace after upgrade to wordpress 5.70Hi Aldo
Many thanks for your prompt response. I’ve given that a go but I’m still getting those paragraphs I’m afraid:
<!-- wp:shortcode --> [private role="custom" custom_role="custom_role_name" container="div"] <!-- /wp:shortcode --> <!-- wp:list --> <ul><li><a href="https://example.com/admin/index">Admin</a></li></ul> <!-- /wp:list --> <!-- wp:shortcode --> [/private] <!-- /wp:shortcode -->
Gives generated code:
<div class="private custom_role_name-content"> <p></p> <ul><li><a href="https://example.com/admin/index">Admin</a></li></ul> <p></p> </div>
So those phantom paragraphs passed through from wordpress are still displaying.
Works perfectly. Thanks very much @stevejburge!
Tested and yes, it works fine. Thanks!
Done – thanks again Vinod
Marking as resolved here.
Hi Vinod,
No problem at all! I’ve updated and can confirm it’s all working correctly.
Thanks a lot for your prompt replies, and congratulations on the plugin – it’s great
Cheers
Dan
Sure. All three had the error “Expression #1 of ORDER BY clause is not in SELECT list, references column ‘wordpress.wp_posts.post_date’ which is not in SELECT list; this is incompatible with DISTINCT”
So I removed the distinct and added a group by, to give:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND … group by wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10
And got:
Query 1: “The regular expression contains an unclosed bracket expression.”
Query 2: query worked fine, 10 rows returned
Query 3: query worked fine, 0 rows returned
I’ve just given it a reset on my development site (which isn’t publicly accessible unfortunately) and it had no effect. As soon as Fuzzy Matching = Whole, I get no results. When Fuzzy Matching = Partial, I get results.
Here are the two queries running against the database, which I intercepted using the ‘posts_where’ filter:
Partial:
AND ( ((wp_posts.post_title LIKE ‘{7fcd9d466186ff775e1079cc8fb6f57c99a4461aa6b41b3ac16ef0841a4b6a1d}parent{7fcd9d466186ff775e1079cc8fb6f57c99a4461aa6b41b3ac16ef0841a4b6a1d}’) OR (wp_posts.post_content LIKE ‘{7fcd9d466186ff775e1079cc8fb6f57c99a4461aa6b41b3ac16ef0841a4b6a1d}parent{7fcd9d466186ff775e1079cc8fb6f57c99a4461aa6b41b3ac16ef0841a4b6a1d}’) OR (wp_posts.post_excerpt LIKE ‘{7fcd9d466186ff775e1079cc8fb6f57c99a4461aa6b41b3ac16ef0841a4b6a1d}parent{7fcd9d466186ff775e1079cc8fb6f57c99a4461aa6b41b3ac16ef0841a4b6a1d}’))) AND wp_posts.post_type IN (‘post’, ‘page’) AND (wp_posts.post_status = ‘publish’)
Whole:
AND ( ((wp_posts.post_title REGEXP ‘(^|[[\\s|.|~|
|!|@|#|$|{f6dd7bf71b55e6f46e5048a3b2dcb866092152f00922a87c3e8e44e6c3db24f6}|^|&|*|(|)|_|\\-|+|=|{|}|[|\\]|\\||:|;|<|>|\\?|\\/|\\|\\]])parent([[\\s|.|~|
|!|@|#|$|{f6dd7bf71b55e6f46e5048a3b2dcb866092152f00922a87c3e8e44e6c3db24f6}|^|&|*|(|)|_|\\-|+|=|{|}|[|\\]|\\||:|;|<|>|\\?|\\/|\\|\\]]|$)’) OR (wp_posts.post_content REGEXP ‘(^|[[\\s|.|~||!|@|#|$|{f6dd7bf71b55e6f46e5048a3b2dcb866092152f00922a87c3e8e44e6c3db24f6}|^|&|*|(|)|_|\\-|+|=|{|}|[|\\]|\\||:|;|<|>|\\?|\\/|\\|\\]])parent([[\\s|.|~|
|!|@|#|$|{f6dd7bf71b55e6f46e5048a3b2dcb866092152f00922a87c3e8e44e6c3db24f6}|^|&|*|(|)|_|\\-|+|=|{|}|[|\\]|\\||:|;|<|>|\\?|\\/|\\|\\]]|$)’) OR (wp_posts.post_excerpt REGEXP ‘(^|[[\\s|.|~||!|@|#|$|{f6dd7bf71b55e6f46e5048a3b2dcb866092152f00922a87c3e8e44e6c3db24f6}|^|&|*|(|)|_|\\-|+|=|{|}|[|\\]|\\||:|;|<|>|\\?|\\/|\\|\\]])parent([[\\s|.|~|
|!|@|#|$|{f6dd7bf71b55e6f46e5048a3b2dcb866092152f00922a87c3e8e44e6c3db24f6}|^|&|*|(|)|_|\\-|+|=|{|}|[|\\]|\\||:|;|<|>|\\?|\\/|\\|\\]]|$)’))) AND wp_posts.post_type IN (‘post’, ‘page’) AND (wp_posts.post_status = ‘publish’)When I try running the “whole” where clause above against the database directly, I get the error: “The regular expression contains an unclosed bracket expression.”
Oh – I’m running MySQL version 8 – specifically 8.0.20-1debian10.
Wonderful – thanks Vinod!
We are getting somewhere, as I have other search forms which still work OK!
For the default search form:
* Search All Or Any Search Terms = AND
* Fuzzy Matching = WholeFor the other search form which works OK:
* Search All Or Any Search Terms = AND
* Fuzzy Matching = PartialWhen I toggle Fuzzy Matching to Partial on the default search form then it starts working again, but obviously with partial matching on!
Yes. When on version 4.4.10, the following pages are shown in the search results:
https://www.fsc.org.uk/parents-reference/associate-membership/
https://www.fsc.org.uk/parents-reference/fsc-stores/
https://www.fsc.org.uk/parents-reference/applying-for-camp/Forum: Plugins
In reply to: [Allow Multiple Accounts] SupportHi @coffee2code
If you’d like a hand updating this useful plugin then I’m more than happy to help out
Dan