• Resolved macwinson

    (@macwinson)


    Hi Roland!

    I’m getting this error when I go to
    /wp-admin/admin.php?page=participants-database
    but only with user role “Author”:

    Fatal error: Uncaught Error: Call to undefined method PDb_admin_list\all_fields::is_numeric() in /public_html/wp-content/plugins/participants-database/classes/PDb_admin_list/query.php:326 Stack trace: #0 /public_html/wp-content/plugins/participants-database/classes/PDb_admin_list/query.php(310): PDb_admin_list\query->empty_value_phrase(Object(PDb_admin_list\all_fields), false) #1 /public_html/wp-content/plugins/participants-database/classes/PDb_admin_list/query.php(276): PDb_admin_list\query->empty_value_where_clause('=', Object(PDb_admin_list\all_fields)) #2 /public_html/wp-content/plugins/participants-database/classes/PDb_admin_list/query.php(119): PDb_admin_list\query->_add_where_clause(Array) #3 /public_html/wp-content/plugins/participants-database/classes/PDb_admin_list/query.php(46): PDb_admin_list\query->_process_search() #4 /ho in /public_html/wp-content/plugins/participants-database/classes/PDb_admin_list/query.php on line 326

    If I login as an Administrator, I can see the admin page normally.
    Maybe is something related with the search terms that was entered by the Author user (and saved by default)? There is a way to clear that?

    I tried creating a NEW user (as Author), and all works fine. But if I login with the previous user (Author) the error remains.

    Thanks!!!

    WordPress 5.8
    Participants Database 1.9.7.5
    PHP 7.4.21

    • This topic was modified 4 years, 10 months ago by macwinson.
    • This topic was modified 4 years, 10 months ago by macwinson.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Roland Barker

    (@xnau)

    Thanks for letting me know about this. I don’t have an immediate answer for you, it looks like there might be a bug there, but it will take me some time to figure that out.

    The reason it is triggering for that one user only is that each user has the last search they used stored, which is recalled when the user opens the admin List Participants page. This error might also pop up for other users that tried whatever combination of settings led to the error.

    It would be helpful if you could look at the admin list filter settings for the user that is seeing the problem and post that here so I can try to replicate the problem.

    You can probably avoid the error by clearing the admin list search for that one user.

    Thread Starter macwinson

    (@macwinson)

    Hi, thanks for the answer! I forgot to mention that below the error I have a blank page, I see nothing but the error and the WP menu in /wp-admin/admin.php?page=participants-database

    But maybe I can find the stored search configuration for that particular user in the database. Where I may start to look? This is what I get so far:

    "option_id","option_name","option_value","autoload"
    "365","pdb-admin_list_filter-1","a:4:{s:6:""sortBy"";s:12:""date_updated"";s:7:""ascdesc"";s:4:""DESC"";s:17:""list_filter_count"";s:1:""1"";s:6:""search"";a:1:{i:0;a:4:{s:12:""search_field"";s:4:""none"";s:5:""value"";s:0:"""";s:8:""operator"";s:4:""LIKE"";s:5:""logic"";s:3:""AND"";}}}","yes"
    "387","pdb-admin_list_filter-2","a:4:{s:6:""sortBy"";s:13:""date_recorded"";s:7:""ascdesc"";s:4:""desc"";s:17:""list_filter_count"";s:1:""1"";s:6:""search"";a:1:{i:0;a:4:{s:12:""search_field"";s:14:""pdb_all_fields"";s:5:""value"";s:0:"""";s:8:""operator"";s:1:""="";s:5:""logic"";s:3:""AND"";}}}","yes"
    "14688","pdb-admin_list_filter-4","a:4:{s:6:""search"";a:1:{i:0;a:4:{s:12:""search_field"";s:4:""none"";s:5:""value"";s:0:"""";s:8:""operator"";s:4:""LIKE"";s:5:""logic"";s:3:""AND"";}}s:6:""sortBy"";s:12:""date_updated"";s:7:""ascdesc"";s:4:""desc"";s:17:""list_filter_count"";i:1;}","yes"
    "364","pdb-admin-user-settings-1","a:3:{s:10:""list_limit"";i:10;s:13:""with_selected"";s:6:""delete"";s:17:""csv_base_filename"";s:21:""participants-database"";}","yes"
    "386","pdb-admin-user-settings-2","a:2:{s:10:""list_limit"";i:10;s:13:""with_selected"";s:6:""delete"";}","yes"
    "14687","pdb-admin-user-settings-4","a:1:{s:10:""list_limit"";s:2:""10"";}","yes"
    Plugin Author Roland Barker

    (@xnau)

    The number at the end of the setting is the ID of the user, so find the id of the user to delete just their preferences.

    Thread Starter macwinson

    (@macwinson)

    The ID of the user is “2”, so I guess these are the records that matter?

    "387","pdb-admin_list_filter-2","a:4:{s:6:""sortBy"";s:13:""date_recorded"";s:7:""ascdesc"";s:4:""desc"";s:17:""list_filter_count"";s:1:""1"";s:6:""search"";a:1:{i:0;a:4:{s:12:""search_field"";s:14:""pdb_all_fields"";s:5:""value"";s:0:"""";s:8:""operator"";s:1:""="";s:5:""logic"";s:3:""AND"";}}}","yes"

    "386","pdb-admin-user-settings-2","a:2:{s:10:""list_limit"";i:10;s:13:""with_selected"";s:6:""delete"";}","yes"

    What should I do? copy a working “option_value” (from user ID 4 for instance) for user ID 2 ? In pdb-admin-user-settings ?

    Plugin Author Roland Barker

    (@xnau)

    You should delete it entirely, it will get rebuilt when the user returns to the page.

    However you do it, make a backup first, especially if you’re not familiar with how to make changes directly to the database. There’s a lot of ways that can go wrong.

    Thread Starter macwinson

    (@macwinson)

    OK, I will try it. Thanks for the advice.
    Those records give you a hint of what string or search combination may have triggered the issue?

    Thread Starter macwinson

    (@macwinson)

    Just an update, I was able to recreate the error:

    1) go to List Participants

    2) change dropdown: Show only records with: “Multi-Field: Any Field”
    *the same situation “Multi-Field: Any Text Field”
    that – contains – *no need to enter anything to search*

    3) click on “Filter”

    4) you will get the error:

    using: “Multi-Field: Any Field”

    Fatal error: Uncaught Error: Call to undefined method PDb_admin_list\all_fields::is_numeric() in \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php:326 Stack trace: 
    #0 \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php(310): PDb_admin_list\query->empty_value_phrase(Object(PDb_admin_list\all_fields), false) 
    #1 \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php(276): PDb_admin_list\query->empty_value_where_clause('LIKE', Object(PDb_admin_list\all_fields)) 
    #2 \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php(119): PDb_admin_list\query->_add_where_clause(Array) 
    #3 \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php(46): PDb_admin_list\query->_process_search() 
    #4 \wp-content\plugins\participants-database\classes\PD in \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php on line 326

    using “Multi-Field: Any Text Field”

    Fatal error: Uncaught Error: Call to undefined method PDb_admin_list\text_fields::is_numeric() in \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php:326 Stack trace: 
    #0 \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php(310): PDb_admin_list\query->empty_value_phrase(Object(PDb_admin_list\text_fields), false) 
    #1 \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php(276): PDb_admin_list\query->empty_value_where_clause('LIKE', Object(PDb_admin_list\text_fields)) 
    #2 \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php(119): PDb_admin_list\query->_add_where_clause(Array) 
    #3 \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php(46): PDb_admin_list\query->_process_search() 
    #4 \wp-content\plugins\participants-database\classes in \wp-content\plugins\participants-database\classes\PDb_admin_list\query.php on line 326

    By now, I can reset the user options this way: go to phpmyadmin, table wp_options, and delete:

    pdb-admin-user-settings-(ID of the user)
    pdb-admin_list_filter-(ID of the user)

    Plugin Author Roland Barker

    (@xnau)

    thanks for all the detail, looks like I got a bug to fix, I’ll try to get that out in the next couple of days.

    Thread Starter macwinson

    (@macwinson)

    Hi Roland,
    Thanks for your concern and commitment!

    I know maybe is not related, but it draw my attention because of the connection with wp_options table: on another site with PDb (where I didn’t touch the database or update anything -WP core, plugins, themes…-) yesterday I found some things broken in the live site. When I went to the plugin settings I found nearly all settings restored to default (Single Record Link Field, Single Record Page, Record Edit Access Level, and so on).
    What can be the cause of suddenly get the PDb settings reseted to default? It’s very strange, because I never saw anything like this in WP. Thanks!!!

    • This reply was modified 4 years, 10 months ago by macwinson.
    Plugin Author Roland Barker

    (@xnau)

    I’m investigating this, Can you tell me what Participants Database add-ons you are using?

    Thread Starter macwinson

    (@macwinson)

    By the moment I don’t use any add-on, because the people that use PDb are just starting to use the database and familiarizing with how it works. It seems simple, but is very powerful “as is” and complex in some ways. I’m planning to include Combo Multisearch and Directory Tools (Proxy Posts).

    Plugin Author Roland Barker

    (@xnau)

    OK, thanks, I needed to know what code you’re running.

    Thread Starter macwinson

    (@macwinson)

    The issue related with the drop-down “Show only records with: Multi-Field… Any Field/Any Text Field” seems to be solved after the update Version 1.9.7.6
    I will be checking the thing related with the plugin options.

    An enormous thank you!!!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Call to undefined method PDb_admin_list’ is closed to new replies.