Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 86 total)
  • Author
    Posts
  • in reply to: RWMB_Post_Field::search_by_title() #32662
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Hello sir,

    just now got the update for the above PHP warning. Please close this ticket.

    Prabakaran ShankarPrabakaran Shankar
    Participant

    Hello,

    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 ?

    Prabakaran ShankarPrabakaran Shankar
    Participant

    Hello,

    As I have deleted some of the posts on my site which cleared the error.

    please close this topic.

    Prabakaran ShankarPrabakaran Shankar
    Participant

    Thank you very much for your reply

    Prabakaran ShankarPrabakaran Shankar
    Participant

    Thank you Dev Team for your acceptance to include the feature "pay to post".

    Do you have any tentative dates for this feature update?

    Prabakaran ShankarPrabakaran Shankar
    Participant

    Hello,

    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.

    Prabakaran ShankarPrabakaran Shankar
    Participant

    Hi,

    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();
    }
    );
    
    in reply to: Fields - Posts are publishing even if 'Required' is true #31778
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Is 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?

    in reply to: Fields - Posts are publishing even if 'Required' is true #31777
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Thank you very much for escalating this issue to DEV.

    Is there any alternative way to override this?

    in reply to: Display Recent Post from the Terms #31765
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Please 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.

    in reply to: Fields - Posts are publishing even if 'Required' is true #31764
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Thank 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!

    in reply to: PHP error - trim(): Argument #1 ($string) #31763
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Please 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.

    Prabakaran ShankarPrabakaran Shankar
    Participant

    For 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 AS mbr_69_to 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 mbr_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

    in reply to: PHP Error - SRC-Renderer.php #29334
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Hello 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 %}
    in reply to: Query in Relationship - Post per page #29229
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Thank you So much...

Viewing 15 posts - 46 through 60 (of 86 total)