Support Forum » User Profile

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: MB Relationships + MB Frontend Submission #20914
    DaveDave
    Participant

    Nick, MB Frontend Submission was insufficient for my needs. I ended up writing the my own UI, AJAX, and server code to handle the requests. I still used the MB Relationship php helper methods to process the data on the server.

    in reply to: Retrieving data right after saving #19606
    DaveDave
    Participant

    Thank you Anh!

    I went to inc/class-mb-custom-table-cache.php and set $row = false; in the get() function. Then it fixed things (even though I won't have the benefit of the caching).

    The FacetWP is still complaining but it may be because of something else.

    in reply to: Retrieving data right after saving #19593
    DaveDave
    Participant

    Unfortunately, this did not work. No change.

    I've dug into the code to try and figure out what is going on and I keep coming back to this function.
    'public static function call()' in this file '/inc/field.php'.

    It calls 'call_user_func_array( array( RWMB_Helpers_Field::get_class( $field ), $method ), $args )' but I'm confused where this goes.

    Remember, I'm updating the custom table in the database manually with $wpdb->update() and then calling rwmb_meta( $field_id, ['storage_type' => 'custom_table', 'table' => $table_name] ); right afterwards.

    The issue is that I'm calling these in the same server request. If I send another request and ask for the data with rwmb_meta(), it comes back correct.

    The reason I need this to work is that I'm also using FacetWP and I want to index a post after saving. When I run the FacetWP index function the data it's using to index is INCORRECT!

    in reply to: MB Relationships + MB Frontend Submission #17881
    DaveDave
    Participant

    Anh, I found this thread and I'm a little confused. Lets say I have a custom post called 'Classes' and I want to link that to a custom post type of 'Room'. I want to be able to edit the 'Class' with MB Frontend and select or add a new 'Room' from a 'select_advanced' field. How could I do that?

    in reply to: MB Term Meta with MB Frontend Submission #17878
    DaveDave
    Participant

    Another way I might be able to achieve this is to create a custom post type to store my data and then create a relationship to the custom taxonomy. This way I can use MB Frontend on the custom post and then link to the taxonomy in code.

    in reply to: Hooking into get_post_metadata and add_post_metadata #17870
    DaveDave
    Participant

    This is what I got working

    if (empty(rwmb_get_value('idea_source', null, $post_id ))) {
                    $term = get_term_by('slug', strtolower($tweet_info['source']), 'idea-source');
        
                    if (!$term) {       
                        $term = wp_insert_term( $tweet_info['source'], 'idea-source', null );
                    } 
    
                    $term = isset( $term['term_id'] ) ? $term['term_id'] : null;
                    
                    $post_data['source_tax'] = $term;
                }

    Later on I did this

    $wpdb->update('TABLE_NAME', $post_data, array( 'ID' => $post_id));

    in reply to: Hooking into get_post_metadata and add_post_metadata #17867
    DaveDave
    Participant

    So this will work but is difficult. I’m trying to programmatically create a new taxonomy term, of it does not already exist, and save the term in a taxonomy_advanced field in a custom table. I’ve been digging into the plugin files to figure out how this is done by default. I’m thinking I can call the ‘value’ method on the advanced taxonomy class?

    in reply to: Hooking into get_post_metadata and add_post_metadata #17857
    DaveDave
    Participant

    I've got the same issue.

    in reply to: Custom Fields are not saving to Custom Table #17851
    DaveDave
    Participant

    Ok, I figured it out. I was using type 'taxonomy' but when I switched to 'taxonomy-advanced' it worked.

    in reply to: Custom Fields are not saving to Custom Table #17850
    DaveDave
    Participant

    Hi Anh, I was having the same issue so I just updated my AIO to version 1.10.13 but the issue is still there. The taxonomy field is not saving to my custom table.

    in reply to: Override MetaBox Method #17808
    DaveDave
    Participant

    Excellent, just what I was looking for.

    in reply to: rwmb_frontend_after_process set static value #17477
    DaveDave
    Participant

    Hi, I found this question while trying to figure out how to generate a post_title by combining several metabox fields. I tried modifying the $_POST['post_title'] = $_POST['FIELD_NAME1'] . ' ' . $POST['FIELD_NAME2']; in the 'rwmb_frontend_before_process' hook but nothing changed. I emailed myself json_encode($_POST) after the change and it did change the $_POST['post_title'] but when the save is made to the database it is not correct. Please help me understand what I'm doing wrong.

Viewing 12 posts - 1 through 12 (of 12 total)