Forum Replies Created
-
AuthorPosts
-
davidrknowles
ParticipantThe above error goes away if I specify a "to" in the query, but this doesnt work well if I am using a slug and not an ID, as I dont think ID is availible in the loop yet.
This also doesnt solve the problem of it returning nothing and the theme replacing it with the archive layout.
$query->set( 'relationship', [ 'id' => 'client_projects', 'from' => 178, 'to' => 107 ]);davidrknowles
ParticipantJust running through the debug, I get the following database error:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) WHERE 1=1 AND wp_posts.post_name = 'scott-street' AND wp_posts.post_t...' at line 2]
SELECT wp_posts.* , mbr.to FROM wp_posts INNER JOIN wp_mb_relationships AS mbr ON (mbr.from = wp_posts.ID AND mbr.type = 'client_projects' AND mbr.to IN ()) WHERE 1=1 AND wp_posts.post_name = 'scott-street' AND wp_posts.post_type = 'project' GROUP BY mbr.to, wp_posts.ID ORDER BY mbr.order_todavidrknowles
ParticipantThe metabox looks like this:
?php add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); function your_prefix_register_meta_boxes( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => esc_html__( 'drk-content', 'text-domain' ), 'id' => 'drk-content', 'post_types' => ['post'], 'context' => 'side', 'priority' => 'high', 'fields' => [ [ 'id' => $prefix . 'thumb-image', 'type' => 'image_select', 'name' => esc_html__( 'Thumb Image', 'text-domain' ), 'desc' => esc_html__( 'Thumb image for grid feature', 'text-domain' ), 'required' => 1, ], ], ]; return $meta_boxes; }davidrknowles
ParticipantFixed that too lol turns out I was editing the shortcode in the WP Block and not the beaver builder module.
Seems to be working perfectly now. thanks
davidrknowles
ParticipantOk I think I have sorted it, being away from WP for a while has made forget what a hassle caching can be, I turned off VARNISH in my server and it seems to be all work.
The only weird thing now is the Title field is now showing regardless of not having it in the shortcode.
davidrknowles
ParticipantI really dont understand why it's not working, I have updated to PHP 7.4, I have reflushed the server permissions, restarted the server. Now its not submitting with all the plugins off and the default theme without being logged in.
davidrknowles
ParticipantThats really weird both those links work fine.
This is my form: https://davidrknowles.com/contact/
davidrknowles
ParticipantAlso worth adding without both ajax request or reCaptcha it still fails in a different browser like Brave or firefox, it just gives a 404.
davidrknowles
ParticipantHi Long,
I tried all of what you have suggested and it is as follows.
Everything off apart from meta box and meta box AIO:
with ajax = Fail
without ajax = PassSo I turned everything on again:
with ajax = Fail
without ajax = PassI then tried with without ajax but added in reCaptcha = Fail
So it looks like its to do with the validation of the ajax request or reCaptcha, maybe requiring some kind of user validation.
Hope this helps
davidrknowles
ParticipantIgnore the
PHP Warning: chmod()warning, it was just a server permission error, was hoping it would fix the form submission issue but to no avail.I have tried removing the action
rwmb_frontend_after_processand also editing the post type settings, and removing reCaptcha and AJAX. without AJAX I get a 404 returned.November 21, 2018 at 7:07 PM in reply to: ✅MB Admin Columns - not sortable when using customtable #12124davidrknowles
ParticipantCool, thought I was going crazy lol
September 27, 2018 at 8:36 AM in reply to: ✅Taxonomy Field - Not saving to term_relationships #11434davidrknowles
ParticipantThanks Anh, thought this might have been the case, I have made an AJAX hack but am just trying to refine it a little and use a filter or action that passes the meta fields before it is saved to the database.
September 20, 2018 at 7:02 PM in reply to: ✅Taxonomy Field - Not saving to term_relationships #11406davidrknowles
ParticipantJust released I didn't finish what I was thinking lol
So the taxonomy field is not creating a relationship with the post and the term, I think the standard way is to write the link in the term_relationships table but this isn't happening, instead, it is writing to the custom table I have on that post type for all the meta.
I am yet to try and see if having the table is the cause of the issue.
davidrknowles
ParticipantYes you could do this by using some of the hooks, to check the author of previously entered forms and maybe a redirect if one has already submitted a form. You then would need to set the user role caps for the custom post type so the user can only edit own. You could create a filter on the archive query that only retrieves post from that user too.
As far as GF integration, its my understanding that this is the point of frontend submission and with the rest of the metabox conditional extensions you could do most of what gravity does. Only thing you may need is a notification system for email notifications.
davidrknowles
Participant+1 for sure
-
AuthorPosts