Support Forum Β» User Profile

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 48 total)
  • Author
    Posts
  • in reply to: βœ…MetaBox equivalent to `the_content` filter #40423
    brandonjpbrandonjp
    Participant

    Sorry, I hit the back button and I thought I was editing my post. πŸ€¦β€β™€οΈ πŸ™‚

    in reply to: βœ…MetaBox equivalent to `the_content` filter #40420
    brandonjpbrandonjp
    Participant

    I think I was having an issue with priority and shortcodes. This seems to be working now, but if there is a better or more preferred way, I'm interested to know. Thank you!

    add_filter( 'rwmb_meta', function( $value, $field_id, $args, $object_id ) {
        // look for my custom fields
        $filterThese = array('extra_info','user_notes','manager_notes');
        if ( in_array($field_id, $filterThese, true) ) {
            // run my custom field values through the filter
            return filter_keywords($value);
        }
        return $value;
    }, 99, 4 );
    
    brandonjpbrandonjp
    Participant

    My apologies, I just discovered that the issue has been fixed in the git repo.
    https://github.com/wpmetabox/meta-box/commit/d18fe9a84d29fab1b66a5454b19b05c8c7cc380d
    Thank you

    in reply to: βœ…get_term_meta vs rwmb_meta #39762
    brandonjpbrandonjp
    Participant

    I'm using MB Term Meta * Version: 1.2.10

    Thanks for looking into it. But no problem, I’ll just stick with get_term_meta

    in reply to: βœ…get_term_meta vs rwmb_meta #39701
    brandonjpbrandonjp
    Participant

    Hi Peter. Thanks for the reply. Truthfully this is not a big issue for me now, as I have it working using get_term_meta() but I am still curious why rwmb_meta() does not work.

    Below is the code used to create user select meta field on the taxonomy: https://cln.sh/QO9iJ6

    array(
        'id'         => $prefix . 'pm_related_user',
        'type'       => 'user',
        'name'       => esc_html__('User Account', 'text-domain'),
        'desc'       => esc_html__('Select the User Account for this PM.', 'text-domain'),
        'class'      => 'add-add-new',
        'query_args' => array(
            'role__in' => 'c_____project_manager',
        ),
        'field_type' => 'select_advanced',
        'tab'        => 'pm-tab',
    ),

    Here are some samples of the database where the user ID is correctly saving to the meta field pm_related_user - https://cln.sh/4uPNJ3

    Thanks, Peter!
    --Brandon

    in reply to: βœ…get_term_meta vs rwmb_meta #39660
    brandonjpbrandonjp
    Participant

    hmmm... var_dump($value) from the above code is showing bool(false)

    in reply to: Custom Post Type 404 Error #37260
    brandonjpbrandonjp
    Participant

    I have this same exact same issue VERY often... even when there is no static page with the same slug. I don't understand what causes it, but here's how I usually fix it...

    1. change the slug of the CPT to something random/unique
    2. go to: /wp-admin/options-permalink.php & change the permalink structure
    3. go back to your CPT and change the slug back to what you want
    4. go back to: /wp-admin/options-permalink.php & change the permalink structure to what you want

    Usually that fixes it for me.

    in reply to: βœ…CSS not working for views #36790
    brandonjpbrandonjp
    Participant

    If it helps anyone else... I often *think* have this problem until I realize that I forgot to change the View Type - https://docs.metabox.io/extensions/mb-views/#type

    Often, I'll be trying to insert a Shortcode view into a page and the CSS will not render and then I'll realize I never selected "Shortcode" ... and that makes all the difference πŸ™‚

    in reply to: View is using same post for every item on Posts/Archive page #33923
    brandonjpbrandonjp
    Participant

    Hi Long, Thanks for the quick reply. I created a work around, but the issue still exists. (I had to present the site yesterday, but I have switched it back to the broken version today.)

    The issue happens when I use the default WP latest posts page. In WP Admin Settings > Reading, if I set "Your homepage displays" to "Your latest posts" then the view does not use the correct post. I have put this shortcode in the posts list using the new WP theme editor like this: https://cln.sh/dNr79H but it continually only renders the First (most recent) post - like this:L https://cln.sh/gFbeKj - rather than the current post in the loop.

    Here again is the site - currently back to the broken version on the homepage: https://omnimodern.little.am/

    brandonjpbrandonjp
    Participant

    This info should be part of the official documentation (or even better, as a note on the admin screens when listing or adding a new View). Almost every time I use MB Views, I spend a few minutes trying to figure out why the views are returning 404... every time I go through this process of thinking... "It's broken... but it can't be... MetaBox is perfect... It's my site... I need to wipe everything and do a clean WP install..." until I eventually start googling and find it in my search history and then end up on a forum post. And every time re-saving the permalink structure fixes it. πŸ™‚ maybe one day I'll remember that right away!

    in reply to: βœ…Dot notation for MB Geolocation "type" #22462
    brandonjpbrandonjp
    Participant

    Just an update that my solution to set a square bracket array... I thought it was working, but realized it's not now and maybe never was!

    So best to stick with Anh Tran's answer #16001 (he's always the best person to trust anyhow πŸ™‚)

    geo.types.0 = (cities)
    geo.types.1 = establishment

    in reply to: βœ…Taxonomy select_advanced select2 field is very slow #21099
    brandonjpbrandonjp
    Participant

    I have an update!

    #1 - I've run over 50 tests and replicated my site onto 5 different server environments & found that the issue is with my server, DreamPress by DreamHost. Even on regular shared hosting from DreamHost (their non-DreamPress hosting), the site performs on average 5x better. I typically love DreamHost, but for this particular site we are switching to a different host. DreamPress explained to us that:

    "Reviewing the site further, it does perform better on our non-DreamPress services such as shared or VPS. What that tells me is that the way that your plugin is configured is it's either not compatible with a proxy-based setup like we use on DreamPress as we use ngxcache to serve the site, which reverse proxies back to apache or the way it's handling caching is causing the problem and needs to have a rewrite."

    I don't really understand exactly how that's affecting our plugin, as our plugin is not very complicated (other than it uses MetaBox for lots of custom fields with MB Custom Table).

    Are you familiar with ngxcache & reverse proxies? Or have you had any other users where MetaBox.io plugin has performance issues because of caching?

    #2 - However, there is the secondary issue that select_advanced select2 fields are still waiting on an ajax query on first click, even though they are simply fetching the same terms that were already loaded into the page. I think this should probably be a separate bug report, as I don't think this is how Metabox's select2 is expected to behave.

    brandonjpbrandonjp
    Participant

    Hello- I have realized something... Even though the first 10 are loaded, I think it is still making a new AJAX request and waiting on request to finish before it shows the first 10 that were pre-loaded. https://cln.sh/xgwV9g

    Also in your screen recording it seems to take 2.5 seconds, which is a long time to load 10 items that are already in the page.

    in reply to: βœ…Taxonomy select_advanced select2 field is very slow #21002
    brandonjpbrandonjp
    Participant

    Thanks, Long. On the docs, it says

    When the field is loaded, Meta Box only queries for saved terms (which is usually not many). So the initial query is very minimal and doesn’t cause any performance problem.

    screenshot: https://cln.sh/mxnF3I

    What does saved terms mean?

    Right now we've got 150 tags and it takes usually 15 seconds to populate the dropdown, and it's currently set to only query for 10 terms.

    • Is reducing the number of terms in the DB the only option?
    • Would our internet speed or anything else be contributing you could think of?
    • We're using MB Custom DB Tables, would that make it slower?

    My next idea is I'm thinking about loading all terms as JSON into the browser on the page load. My users would be happier with extra time on page load, I think.

    in reply to: βœ…Meta Box AIO - Update Failed (1.4.1 - 1.4.2) #17611
    brandonjpbrandonjp
    Participant

    It works! Thanks, Anh!

Viewing 15 posts - 16 through 30 (of 48 total)