• Resolved Carsten Lund

    (@carsten-lund)


    Hi there, I receive this error on my /search page when using Docket Cache.The form is added a page using a shortcode [bps_form id=4936]

    BP Profile Search 5.3.5 error: Form ID “4936” is empty or nonexistent.

    Any idea why this is happening?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi,

    I didn’t test it yet, will update this issue once test it.

    Thanks for the report.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi,

    This is a quick fix:

    1. Edit bp-profile-search/bps-start.php
    2. Go to line 75

    function bps_meta ($form)
    {
        static $options;
        if (isset ($options[$form]))  return $options[$form];
    
        $default = array ();
        $default['field_code'] = array ();
        $default['field_label'] = array ();
        $default['field_desc'] = array ();
        $default['field_mode'] = array ();
        $default['method'] = 'POST';
        $default['action'] = 0;
        $default['directory'] = 'Yes';
        $default['template'] = bps_default_template ();
        $default['template_options'][$default['template']] = array ();
    
        $meta = get_post_meta ($form);
        $options[$form] = isset ($meta['bps_options'])? unserialize ($meta['bps_options'][0]): $default;
    
        return $options[$form];
    }

    replace unserialize with maybe_unserialize

    Before:
    $options[$form] = isset ($meta['bps_options'])? unserialize ($meta['bps_options'][0]): $default;

    After:
    $options[$form] = isset ($meta['bps_options'])? maybe_unserialize ($meta['bps_options'][0]): $default;

    save changes.

    It should fix the error.

    Thanks.

    • This reply was modified 3 years, 8 months ago by Nawawi Jamili.
    Thread Starter Carsten Lund

    (@carsten-lund)

    Thanks for bringing up a solution so quick, I can see that you have already handed it over to the BPS plugin developer.

    Thanks again

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page error’ is closed to new replies.