Forum Replies Created
-
AuthorPosts
-
Prabakaran Shankar
ParticipantHello sir,
just now got the update for the above PHP warning. Please close this ticket.
December 6, 2021 at 11:39 PM in reply to: ✅Required condition in the fields - filter to enable save draft #32461Prabakaran Shankar
ParticipantHello,
Thank you very much for your info. I thought that validation with input attributes function can be overridden.
Is there any way to customize that javascript/jquery function as discussed in the forum
https://wordpress.stackexchange.com/questions/15546/dont-publish-custom-post-type-post-if-a-meta-data-field-isnt-valid ?December 6, 2021 at 12:09 PM in reply to: ✅WordPress database (MariaDB) error in SQL syntax - MB Relationships #32446Prabakaran Shankar
ParticipantHello,
As I have deleted some of the posts on my site which cleared the error.
please close this topic.
November 18, 2021 at 11:54 AM in reply to: ✅Gridbuilder compatibility with timestamp (datetime) field - Custom DB Table #32009Prabakaran Shankar
ParticipantThank you very much for your reply
November 18, 2021 at 12:17 AM in reply to: Pay to Post... User assigned as editor/author... subscription period #31999Prabakaran Shankar
ParticipantThank you Dev Team for your acceptance to include the feature "pay to post".
Do you have any tentative dates for this feature update?
November 8, 2021 at 11:01 PM in reply to: ✅WordPress database (MariaDB) error in SQL syntax - MB Relationships #31804Prabakaran Shankar
ParticipantHello,
Thank you very for the suggestion.
I have checked the first 2 suggestions. 1st case, I have assigned to emp post type only. In 2nd case, it is inside the loop (based on the template part).
For your kind information, the query in the error shows "wp_1p_posts.ID ORDER BY wp_1p_posts.post_date DESC LIMIT 0, 5". Is this referred posts_per_page is 5?
If so, I have kept posts_per-page => 10.
One more, I have noticed that after deleting the posts, the relationships data are not flushing out. it is stored in the DB table.
Just giving some known information to debug it.
Thanks.
November 7, 2021 at 1:43 PM in reply to: ✅WordPress database (MariaDB) error in SQL syntax - MB Relationships #31786Prabakaran Shankar
ParticipantHi,
Server version: 10.3.31-MariaDB-1:10.3.31+maria~bionic
Initially, 10 days back i have used the below code to get the posts
<section style="background-color:#D5F5E3; padding: 40px 20px 20px; border-top-style: solid; border-top-color: #2ECC71; border-top-width: 5px;"> <h2> Recent Jobs at {{ post.title }} </h2> {% set job_args = { post_type: 'job', posts_per_page: 5, relationship: {id: '69', to: post.ID} } %} {% set jobs = mb.get_posts( job_args ) %} {% for job in jobs %} <li><a href="{{ mb.get_the_permalink( job.ID ) }}"><strong>{{ job.post_title }}</strong></a></li> {% endfor %} <p style="padding-top: 30px;"> <strong>For other related Jobs, please visit <a href="https://nviewscareer.com/job/">Jobs</a></strong> </p> </section>But to debug this issue, I have deleted the above code and added new PHP-based code in my function.php
add_shortcode( 'jobs-by-employers', function() { ob_start(); $args= array( 'post_type' => 'job', 'post_status' => 'publish', 'posts_per_page' => 10, 'orderby' => array('title' => 'DESC'), 'tax_query' => array( array( 'taxonomy' => 'current-status', 'field' => 'slug', 'terms' => array( 'ongoing' ), ), ), 'relationship' => array( 'id' => '69', 'to' => get_the_ID(), ), ); $query_jobs_employers = new WP_query( $args ); if( $query_jobs_employers->have_posts() ){ echo '<ul>'; while( $query_jobs_employers->have_posts() ){ $query_jobs_employers->the_post(); ?> <li><a href="<?php the_permalink()?>" target="_blank" rel="noopener noreferrer"> <?php the_title(); ?> </a></li> <?php }echo '</ul>'; } else echo 'Sorry No Jobs availalbe at present, Please check later'; wp_reset_postdata(); return ob_get_clean(); } );November 6, 2021 at 11:50 PM in reply to: Fields - Posts are publishing even if 'Required' is true #31778Prabakaran Shankar
ParticipantIs there any option to save the draft even the validation is not met?
Because, in my case, there are a lot of data (custom fields) that are not saved in the DB is a bit of a complication for us.
Are there any codes to save the content in the DB (save draft) before the validation of the fields especially 'required' attributes?
November 6, 2021 at 9:42 PM in reply to: Fields - Posts are publishing even if 'Required' is true #31777Prabakaran Shankar
ParticipantThank you very much for escalating this issue to DEV.
Is there any alternative way to override this?
Prabakaran Shankar
ParticipantPlease close this topic. I have found an alternative way using PHP to display the recent post based on the tags.
Thank you very much for your valuable time. Really appreciate your kind support to make it happen.
November 6, 2021 at 2:46 AM in reply to: Fields - Posts are publishing even if 'Required' is true #31764Prabakaran Shankar
ParticipantThank you very much for your reply. However, it is not due to the validation. It is due to the tab wrap. I have custom fields that are wrapped in the tabs. The custom fields in the inactive tabs are not working as it is.
The 'required' condition for data in the inactive tabs are not working. The 'required' condition only works in the active tab.
Is there any way to overcome that?
Thanks!
Prabakaran Shankar
ParticipantPlease close this topic as I have deleted the post, the error disappeared. I think some data has been stored in the DB without sanitizing. Anyhow, now it is clear.
July 12, 2021 at 10:23 AM in reply to: Database Error on Relationships after update to latest MetaBox AIO and WP 5.5.1 #29433Prabakaran Shankar
ParticipantFor me also, same error.
So, I have disabled the render function. Even after it shows the error.Error Details:
[12-Jul-2021 02:45:57 UTC] 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_1p_posts.post_type = 'job' AND ((wp_1p_posts.post_statu...' at line 1 for query SELECT wp_1p_posts.* , mbr.to ASmbr_69_toFROM wp_1p_posts INNER JOIN wp_1p_mb_relationships AS mbr ON (mbr.from = wp_1p_posts.ID AND mbr.type = '69' AND mbr.to IN ()) WHERE 1=1 AND wp_1p_posts.post_type = 'job' AND ((wp_1p_posts.post_status = 'publish')) GROUP BYmbr_69_to, wp_1p_posts.ID ORDER BY wp_1p_posts.post_date DESC LIMIT 0, 5 made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_REST_Posts_Controller->get_items, WP_REST_Posts_Controller->prepare_item_for_response, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, MBViewsShortcode->render, MBViewsRenderer->render, MetaBoxDependenciesTwigEnvironment->render, MetaBoxDependenciesTwigTemplateWrapper->render, MetaBoxDependenciesTwigTemplate->render, MetaBoxDependenciesTwigTemplate->display, MetaBoxDependenciesTwigTemplate->displayWithErrorHandling, __TwigTemplate_2410833bb708b9f030d76465809eb5b189484cd32768e47e88d9f2048677ec56->doDisplay, twig_get_attribute, MBViewsTwigProxy->__call, call_user_func_array, get_posts, WP_Query->query, WP_Query->get_posts[12-Jul-2021 02:45:57 UTC] PHP Warning: array_map(): Expected parameter 2 to be an array, null given in /var/web/site/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-views/src/Renderer.php on line 73
Prabakaran Shankar
ParticipantHello sir,
I have observed the following error when I use to display the relationship data using the below code.
[06-Jul-2021 12:34:49 UTC] PHP Warning: array_map(): Expected parameter 2 to be an array, null given in /var/web/site/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-views/src/Renderer.php on line 73 [06-Jul-2021 12:34:49 UTC] 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_1p_posts.post_type = 'job' AND ((wp_1p_posts.post_statu...' at line 1 for query SELECT wp_1p_posts.* , mbr.to AS <code>mbr_69_to</code> FROM wp_1p_posts INNER JOIN wp_1p_mb_relationships AS mbr ON (mbr.from = wp_1p_posts.ID AND mbr.type = '69' AND mbr.to IN ()) WHERE 1=1 AND wp_1p_posts.post_type = 'job' AND ((wp_1p_posts.post_status = 'publish')) GROUP BY <code>mbr_69_to</code>, wp_1p_posts.ID ORDER BY wp_1p_posts.post_date DESC LIMIT 0, 5 made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_REST_Posts_Controller->get_items, WP_REST_Posts_Controller->prepare_item_for_response, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, MBViewsShortcode->render, MBViewsRenderer->render, MetaBoxDependenciesTwigEnvironment->render, MetaBoxDependenciesTwigTemplateWrapper->render, MetaBoxDependenciesTwigTemplate->render, MetaBoxDependenciesTwigTemplate->display, MetaBoxDependenciesTwigTemplate->displayWithErrorHandling, __TwigTemplate_2410833bb708b9f030d76465809eb5b189484cd32768e47e88d9f2048677ec56->doDisplay, twig_get_attribute, MBViewsTwigProxy->__call, call_user_func_array, get_posts, WP_Query->query, WP_Query->get_posts{% set job_args = { post_type: 'job', posts_per_page: 5, relationship: {id: '69', to: post.ID} } %} {% set jobs = mb.get_posts( job_args ) %} {% for job in jobs %} <li><a href="{{ mb.get_the_permalink( job.ID ) }}"><span style="color:black"><strong>{{ job.post_title }}</strong></span></a></li> {% endfor %}Prabakaran Shankar
ParticipantThank you So much...
-
AuthorPosts