SELECT
*
FROM
wp_posts
LEFT JOIN wp_postmeta ON (
wp_posts.ID = wp_postmeta.post_id
AND wp_postmeta.meta_key = '_whp_hide_on_frontpage'
)
LEFT JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id)
WHERE
1 = 1
AND wp_posts.ID NOT IN (11412)
AND (
wp_postmeta.post_id IS NULL
AND (
(
mt1.meta_key = 'start'
AND mt1.meta_value >= '2025-01-10 12:00:00'
)
)
)
AND wp_posts.post_type = 'event'
AND ((wp_posts.post_status = 'publish'))
GROUP BY
wp_posts.ID
ORDER BY
wp_postmeta.meta_value ASC
LIMIT
0, 4;
The Problem here is that it not gets ordered by mt1.meta_value instead it gets ordered by wp_postmeta.meta_value which is random because the value of all fields should be NULL.
If you have any questions about the site or something else that will help you let me know.
PS: Otherwise it’s a very great Plugin.
Use case: I want to combine that power to filter posts using a dynamic variable (populated from PHP) with a custom meta value. For example; Filter all custom post types if the meta value on the WP User object matches with a meta value one or more posts. I want to do this in a secure way so that folks cannot change the author-id in the browser editor to see other folks posts.
It is not clear how one could use stored meta values in the FSE (code view) or in visual block mode. The idea is that sometimes one needs to access stored meta for a user and provide that as a filter on a query block. There seems no way to connect a variable found in dynamic data (PHP) in a specific block enabled page. However the query block appears to support various hardcoded attributes in the FSE.
Since the page has blocks everywhere I don’t expect that I could drop into PHP to grab my user meta value?
Alternatives might be if I could set the query in code and then it would filter as needed using some dynamic data (PHP?). Not sure of WPQuery behavior. Could I load a query before the page is presented and have the posts use the active query?
]]>Hello, a few months ago I started experiencing slowness when editing registrations and products and orders.
It was chaos, I did everything and NOTHING solved it, that’s when I found your plugin and by a stroke of “magic” everything started working again quickly, wonderful!
HOWEVER, I left Woo running on version 8.7.0 for a long time, and yesterday, I decided to update to version 8.8.3 and due to my SADNESS, now, I CANNOT EVEN open an order.
I tried to optimize the DB, returned the keys through your plugin to the default keys, applied the improvements again and NOTHING changed.
I even opened support in Woo and thought 2 things:
1- Or Woo did something about it that your plugin no longer works in this version.
2- Or perhaps you would need some update to your plugin to make it functional and compatible with Woo 8.8.3.
Do you think it would be possible to help me?
Now I’m probably going to roll back the Woo version to 8.7.0 to see if this can be resolved.
My client will go crazy if he tests and is unable to open the orders, I tried, and the server gets an error, sad =/
If you can help, I would be very grateful.
Because your plugin is incredible and saved me.
]]>SELECT posts_lot.post_title AS lot_post_title,
posts_lot.ID AS lot_ID,
posts_lot.post_content AS lot_post_content,
lot_meta_lot_status_tbl.meta_value AS lot_meta_lot_status,
lot_meta_room_tbl.meta_value AS lot_meta_room,
lot_meta_product_tbl.meta_value AS lot_meta_product
FROM fzMCGsSFposts AS posts_lot
INNER JOIN (SELECT lot_meta_lot_status_tbl_posts.ID as id, meta_value, meta_key FROM fzMCGsSFpostmeta AS lot_meta_lot_status_tbl_postmeta INNER JOIN fzMCGsSFposts AS lot_meta_lot_status_tbl_posts ON lot_meta_lot_status_tbl_postmeta.post_id = lot_meta_lot_status_tbl_posts.ID AND lot_meta_lot_status_tbl_posts.post_type = 'lot') AS lot_meta_lot_status_tbl
ON lot_meta_lot_status_tbl.meta_key = 'lot_status' AND lot_meta_lot_status_tbl.id = posts_lot.ID
INNER JOIN (SELECT lot_meta_room_tbl_posts.ID as id, meta_value, meta_key FROM fzMCGsSFpostmeta AS lot_meta_room_tbl_postmeta INNER JOIN fzMCGsSFposts AS lot_meta_room_tbl_posts ON lot_meta_room_tbl_postmeta.post_id = lot_meta_room_tbl_posts.ID AND lot_meta_room_tbl_posts.post_type = 'lot') AS lot_meta_room_tbl
ON lot_meta_room_tbl.meta_key = 'room' AND lot_meta_room_tbl.id = posts_lot.ID
INNER JOIN (SELECT lot_meta_product_tbl_posts.ID as id, meta_value, meta_key FROM fzMCGsSFpostmeta AS lot_meta_product_tbl_postmeta INNER JOIN fzMCGsSFposts AS lot_meta_product_tbl_posts ON lot_meta_product_tbl_postmeta.post_id = lot_meta_product_tbl_posts.ID AND lot_meta_product_tbl_posts.post_type = 'lot') AS lot_meta_product_tbl
ON lot_meta_product_tbl.meta_key = 'product' AND lot_meta_product_tbl.id = posts_lot.ID
WHERE 1=1
AND posts_lot.post_content > '0'
AND posts_lot.post_type = 'lot'
AND lot_status.meta_value = '1199'
Can you help me find the proper syntax to target the lot_status field with a where function?
Thanks very much! Let me know if you need more information.
]]>Deprecated: Required parameter $meta_value follows optional parameter $meta_key in /wp-content/plugins/give/includes/class-give-donor.php on line 1089
Deprecated: Required parameter $meta_value follows optional parameter $meta_key in /wp-content/plugins/give/includes/class-give-donor.php on line 1105
Deprecated: Required parameter $form_id follows optional parameter $nonce in /wp-content/plugins/give/includes/formatting.php on line 794
Deprecated: Required parameter $payment_id follows optional parameter $form_id in /wp-content/plugins/give/includes/deprecated/deprecated-functions.php on line 488
Deprecated: Required parameter $payment_id follows optional parameter $give_form_id in /wp-content/plugins/give/includes/deprecated/deprecated-functions.php on line 549
Deprecated: Required parameter $amount follows optional parameter $form_id in /wp-content/plugins/give/includes/deprecated/deprecated-functions.php on line 780
Please verify and fix it. I’m using PHP 8 if it helps
]]>[13-Apr-2021 14:02:38 UTC] PHP Warning: preg_match(): Compilation failed: number too big in {} quantifier at offset 31 in /home/user/public_html/wp-content/plugins/ultimate-member/includes/core/class-member-directory.php on line 1481
[13-Apr-2021 14:02:38 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 'travis'
OR
mt3.meta_value LIKE '%travis%'
OR
' at line 13 for query SELECT DISTINCT SQL_CALC_FOUND_ROWS wp_users.ID FROM wp_users LEFT JOIN wp_usermeta ON ( wp_users.ID = wp_usermeta.user_id ) LEFT JOIN wp_usermeta AS mt1 ON ( wp_users.ID = mt1.user_id ) LEFT JOIN wp_usermeta AS mt2 ON (wp_users.ID = mt2.user_id AND mt2.meta_key = 'pp_rank' ) LEFT JOIN wp_usermeta AS mt3 ON ( wp_users.ID = mt3.user_id ) LEFT JOIN wp_usermeta AS mt4 ON ( wp_users.ID = mt4.user_id ) WHERE 1=1 AND (
(
(
( wp_usermeta.meta_key = 'um_member_directory_data' AND wp_usermeta.meta_value LIKE '%s:14:\"account\\_status\";s:8:\"approved\";%' )
AND
(
mt1.meta_key = 'pp_rank'
OR
mt2.user_id IS NULL
)
AND
(
mt3user_login LIKE '%travis%' OR user_url LIKE '%travis%' OR display_name LIKE '%travis%' OR user_email LIKE '%travis%' OR user_nicename LIKE '%travis%' OR .meta_value = 'travis'
OR
mt3.meta_value LIKE '%travis%'
OR
mt3.meta_value LIKE '%s:6:\"travis\";%'
)
)
AND
(
(
( mt4.meta_key = 'wp_capabilities' AND mt4.meta_value LIKE '%\"um\\_client-npg\"%' )
OR
( mt4.meta_key = 'wp_capabilities' AND mt4.meta_value LIKE '%\"um\\_free-npg\"%' )
)
)
)
) ORDER BY CAST(mt1.meta_value AS SIGNED) ASC, user_login ASC LIMIT 0, 12 made by do_action('wp_ajax_nopriv_um_get_members'), WP_Hook->do_action, WP_Hook->apply_filters, um\core\Member_Directory->ajax_get_members, WP_User_Query->__construct, WP_User_Query->query
Your plugin has been throwing those 2 errors for about a couple months intermittently now. I don’t know how to replicate it or when it’s happening. I just keep seeing it in the error_log.
Just off eye inspection alone, you can see that after the 2nd AND in the query there’s a “mt3user_login” which seems like an error since “mt3” shouldn’t be there. Furthermore, in that same line you have a “OR .meta_value = ‘travis'” where it seems like the “mt3” should be just before that dot (which is what the 2nd error is complaining about). I’m not sure how this query has passed your testing or how it’s been running all this time without causing massive issues.
]]>meta_value
of Specific meta_key
to integer.Its data is integer but when I getting meta_value its printed as arrayArray ( [0] => 1000000 ) 1
So i didn’t find helpful solution.I would be thankful if you help me with this.
Best Regards
There a Customer can go through a step by step – manual.
Everytime a Step is finished a Value in the database will be increaded to save the progress.
Also i have some text-fields where the User can insert a url and it gets saved in the database.
My Code is working and the Values and text-fields for the url gets updated correctly, but somehow the user-page with the meta-fields do not show the right value.
I installed Ultimate Member in Mai and never made an Version update – everything worked fine.
Now I updated to 2.1.2 and that error occured.
I am also free to show the error via video-chat if that helps to clearify my problem.
webside.com/register/?ref=1
(As example – The Affiliate-Link of User with the User-ID 1.)
When User 2 signs up with the Affiliate-Link of User 1, that Value gets stored through a hidden field in the Signup-Page to a Meta-Value.
So User 2 will have the Meta_value -> Recommender: 1 (ID of his Recommender)
Now I want to create a directory where the user with the ID 1 can only see the members that signed up with his specific Affiliate Link.
Therefore I have to get the Users ID and preselect all the Members with that specific ID.
Is there a way to get the User-ID and have that as a default-preselection Value assigned with the corresponding “Recommender” – Meta_value
]]>