Forum Replies Created
-
AuthorPosts
-
December 13, 2022 at 8:51 AM in reply to: โ Advanced location rules dropdown causes all the fields to disappear #39733
Ryan Maietta
ParticipantThis fixed it for me as well! Thanks.
December 12, 2022 at 10:19 AM in reply to: โ Advanced location rules dropdown causes all the fields to disappear #39703Ryan Maietta
ParticipantSomething is definitely bugged. I'm having a similar issue. It doesn't enter a reload loop; but, every option under the advanced location rules comes up with "No options found". If you try to type anything in the field, it deletes it and replaces it with a blank tag.
Ryan Maietta
ParticipantHi,
Sorry, just for clarity, the conflict is because of that code snippet. I tested it by enabling plug-ins one by one and updating the post three times for each one I enabled. None of the plug-ins triggered it; but, the code snippet did. The glitch is fairly inconsistent; so, I can't be 100% sure. I want to say I'm 80% sure the error is there when the code snippet from the other thread is active. It works except for when it doesn't, which has made troubleshooting difficult. This is the first time it's persisted long enough to actually investigate.
In the thread where I requested help with that snipped, you'd asked me why I needed it set up that way and I didn't have time to explain. But, every year, the event has 9-30+ courses. Each course is organized by day, in alphabetical order. Some courses are reused in later events. And no event is deleted - just archived, so the past schedules have to remain unaffected. That was the trickiest part.
My options were a custom field on each course or setting up a cloneable group with select advanced fields populated from the relationship. The custom field on each course option, honestly, just isn't compatible with my brain. I have ADHD and trying to keep track of what courses go on what years would be borderline impossible for me.
The cloneable group approach lets me immediately see what courses are on what day, and that they're in the right order. It also doesn't mess with the archived versions of the events.
If there's another way to do this, I'm very open to suggestions. Otherwise, figuring out what part of the code is causing this the best option.
Sorry for the wall of text. I know there are many tickets you're working through and I appreciate your time and help with this.
Ryan Maietta
ParticipantUnfortunately the site is broken entirely now.
The Events field group shouldn't be appearing on every post, just events. Was it confirmed that it was an issue with max_input_vars? How does moving it from the Events circumvent that?
From some testing, it looks like the error is with the other code you helped me with in the other thread:
https://support.metabox.io/topic/query-advanced-select-field-by-relationship/
https://pastebin.com/eSPQmuzHWhat part of this would be causing the error?
Ryan Maietta
ParticipantThank you very much โ that looks like it's working correctly. The most important thing is that the relationships don't disappear.
Was there anything wrong with the code I was using, or is there anything I should be cautious of in the future?
Thank you again. I appreciate it.
Ryan Maietta
ParticipantChecking server logs, a few minutes ago I got this:
[24-Mar-2022 22:11:00 UTC] PHP Notice: Undefined index: to in /var/www/htdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-relationships/inc/query/normalizer.php on line 78 [24-Mar-2022 22:11:00 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 ')) WHERE 1=1 AND ((wp_posts.post_type = 'course' AND (wp_posts.post_status = '' at line 1 for query SELECT wp_posts.* , mbr.to AS <code>mbr_event-to-course-relationship_to</code> FROM wp_posts INNER JOIN wp_mb_relationships AS mbr ON (mbr.from = wp_posts.ID AND mbr.type = 'event-to-course-relationship' AND mbr.to IN ()) WHERE 1=1 AND ((wp_posts.post_type = 'course' AND (wp_posts.post_status = 'publish'))) GROUP BY <code>mbr_event-to-course-relationship_to</code>, wp_posts.ID ORDER BY mbr.order_to made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->load_wordpress, require('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, RWMB_Core->register_meta_boxes, apply_filters('rwmb_meta_boxes'), WP_Hook->apply_filters, qrsi_select_adv_repeater, WP_Query->__construct, WP_Query->query, WP_Query->get_postsAnd this from another:
Thu Mar 24 22:10:59 UTC 2022 Configuring /var/www/secure-debug.php Configuring /var/www/wp-config.php for secure debug... Installing Query Monitor Plugin... Notice: Undefined index: to in /var/www/htdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-relationships/inc/query/normalizer.php on line 78 Warning: query-monitor: Plugin already installed. Activating 'query-monitor'... Plugin 'query-monitor' activated. Success: Plugin already installed. Notice: Undefined index: to in /var/www/htdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-relationships/inc/query/normalizer.php on line 78 Success: The cache was flushed.And this from the NGINX logs:
https://pastebin.com/0MUUD94DAnd this from the query monitor plugin:
SELECT wp_posts.* , mbr.to AS<code>mbr_event-to-course-relationship_to</code> FROM wp_posts INNER JOIN wp_mb_relationships AS mbr ON (mbr.from = wp_posts.ID AND mbr.type = 'event-to-course-relationship' AND mbr.to IN ()) WHERE 1=1 AND ((wp_posts.post_type = 'course' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'private'))) GROUP BY <code>mbr_event-to-course-relationship_to</code>, wp_posts.ID ORDER BY mbr.order_toWP_Query->get_posts() wp-includes/class-wp-query.php:3111 WP_Query->query() wp-includes/class-wp-query.php:3542 WP_Query->__construct() wp-includes/class-wp-query.php:3653 qrsi_select_adv_repeater() /tmp/46-schedule-repeater.php:24 apply_filters('rwmb_meta_boxes') wp-includes/plugin.php:189 RWMB_Core->register_meta_boxes() wp-content/plugins/meta-box/inc/core.php:49 do_action('init') wp-includes/plugin.php:474When viewing an event page, the error changes to this:
Only variables should be passed by reference wp-content/plugins/meta-box/inc/fields/file-input.php:38 RWMB_File_Input_Field::html() wp-content/plugins/meta-box/inc/field.php:580 RWMB_Field::call() wp-content/plugins/meta-box/inc/field.php:48 RWMB_Field::show() wp-content/plugins/meta-box/inc/field.php:580 RWMB_Field::call() wp-content/plugins/meta-box/inc/meta-box.php:259 RW_Meta_Box->show() wp-admin/includes/template.php:1395 do_meta_boxes() wp-admin/includes/post.php:2296 the_block_editor_meta_boxes() wp-admin/edit-form-blocks.php:309The code it's referencing might be the one you helped me with here: https://support.metabox.io/topic/query-advanced-select-field-by-relationship/
Fully updated code here: https://pastebin.com/eSPQmuzH
Ryan Maietta
ParticipantHi,
This isn't the page the issue is happening on. It's only on
wp-admin/post.php?post=280&action=editWith just Meta Box, Meta Box AIO, and Advanced Scripts (this is where the code you gave me is added), I'm still having the issue.
EDIT: Re-ordering won't save either:
https://imgur.com/wweB3n4Ryan Maietta
ParticipantUnfortunately neither of these worked. Re-importing the data or adding new relationships still results in the relationships deleting or cloning themselves. I included an admin link through the contact form I sent earlier.
Ryan Maietta
ParticipantThank you. I'll increase the value and see if that helps.
Since I added the relationship through the GUI, will adding that code wipe out the current relationships? If so, is there anywhere I can add it or change so it won't do that?
There are around 7 events total, each with a similar amount of fields.
Thank you,
RyanRyan Maietta
ParticipantI've posted this to the Oxygen and Meta Box Facebook groups to help gather information about why the bug is happening; but here's a video showing the glitch.
Ryan Maietta
ParticipantNevermind. The fields deleted themselves (and their data) again after adding more fields to the page.
Could the contact page please be fixed so we can send admin credentials? This is a really frustrating bug.
Ryan Maietta
ParticipantNot sure what happened; but, I did these things a few hours ago and it started working again:
- Added Cloudflare DNS API to GridPane and enabled SSL. It shouldn't be this one; but, I'm not sure.
- Changed some AutomaticCSS framework settings; as far as I know, these changed only CSS variables.
- Had to resign Oxygen shortcodes after enabling SSL. This is my best guess as to why it suddenly started working again. Something with the Oxygen-Meta Box integration may be broken.I was able to merge the SQL tables from the backup with the current version with no trouble this time.
Ryan Maietta
ParticipantNo luck unfortunately. It has the increased quantity, so that wasn't the issue. It overwrote the new, correct relationships with duplicates from the last three relationships that were there before.
https://imgur.com/d7TF8tcI can't create the relationships via PHP if it means all the existing, functioning relationships will be wiped out. It's also worth noting this is working perfectly fine on every other event page. Since the contact form is broken (see last post), where do I send the admin credentials so this can be looked into?
To save time, here are my other PHP settings:
https://imgur.com/3Su4VWRRyan Maietta
ParticipantI increased the max_input_vars to 10000 from 5000.
On the backup, it looks like this:
https://imgur.com/cPFcgrPOn the current version, it looks like this:
https://imgur.com/whlgaYXThis was built using the GUI. Both object types are posts. Max items is unset.
https://imgur.com/m1tCVDB
Would I add "number" to the query args and set it as high as needed?(Additionally, the contact link on the pinned post is broken.
https://imgur.com/LPv454t - for the Meta Box site)Thank you for your reply and your help.
Ryan Maietta
ParticipantI was able to restore all but one of the relationships. It keeps deleting itself after being added. Unable to restore the fields still, which is the most important part. Where can I put admin credentials so the MB team can take a look at this?
-
AuthorPosts