• https://imgur.com/a/XwsOs

    I’ve tried:

    – deactivating all other plugins
    – downgrading from PHP 5.6.33 to 5.4.16
    – deactivating and reactivating PDB
    – deleting all entries

    It started when I added the ReCAPCHA plugin for PDB. Adding a field on the Manage Database Fields page leads to a blank page. It persists after removing the ReCAPCHA plugin.

    Please help,
    Ryan

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter oramryan

    (@oramryan)

    I got this in my PHP error log:

    [20-Mar-2018 20:44:01 UTC] PHP Fatal error: Call to undefined function mb_check_encoding() in /var/www/html/wp-content/plugins/participants-database/classes/PDb_Manage_Fields.class.php on line 829

    Function it is referring to is:

     public static function make_name( $string )
        {
          /*
           * truncate to 64 characters, then replace any characters that would cause problems
           * in queries
           */
          $name = strtolower( str_replace(
                  array(' ', '-', '/', "'", '"', '\\', '#', '.', '$', '&', '%'),
                  array('_', '_', '_', '', '', '', '', '', '', 'and', 'pct'),
                  stripslashes( substr( $string, 0, 64 ) )
                  ) );
          /*
           * allow only proper unicode letters, numerals and legal symbols
           */
          $name = mb_check_encoding($name, 'UTF-8') ? $name : mb_convert_encoding( $name, 'UTF-8' );
          return preg_replace( '#[^\p{L}\p{N}_]#u', '', $name );
        }
    

    Thanks for your help,
    Ryan

    • This reply was modified 8 years, 2 months ago by oramryan.
    Thread Starter oramryan

    (@oramryan)

    Adding one more post of feedback:

    I got around the issue by commenting out line 829:

    $name = mb_check_encoding($name, 'UTF-8') ? $name : mb_convert_encoding( $name, 'UTF-8' );

    Adding a field works now. I don’t need the sanity check for my personal use anyways.

    Cheers,
    Ryan

    • This reply was modified 8 years, 2 months ago by oramryan.
    Plugin Author Roland Barker

    (@xnau)

    Thanks for pointing this out, this means you don’t have the “mbstring” module installed in your php. That’s a pretty standard module, but I guess not everyone has it.

    Your long-term fix would be to add that module to your php. Ask your web host if you don’t know how to do that.

    When you update your Participants Database, your patch will be lost…fyi

    I too have this issue however I had a look an ‘mbstring’ is already on, I do however have PHP7 running not sure if that changes anything?

    I have checked my PHP logs and get this error

    PDb_List_Admin::initialize list query= SELECT * FROM wombatswp_participants_database p ORDER BY p.date_updated desc

    PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 640073952 bytes) in /home/wombatsh/public_html/site/wp-includes/wp-db.php on line 3184

    PHP Notice: Trying to get property of non-object in /home/wombatsh/public_html/site/wp-includes/post-thumbnail-template.php on line 83

    PHP Notice: Trying to get property of non-object in /home/wombatsh/public_html/site/wp-includes/post-thumbnail-template.php on line 83

    PHP Notice: Undefined property: WP_Tax_Query::$ID in /home/wombatsh/public_html/site/wp-includes/post-thumbnail-template.php on line 83

    PHP Notice: Undefined property: WP_Meta_Query::$ID in /home/wombatsh/public_html/site/wp-includes/post-thumbnail-template.php on line 83

    Plugin Author Roland Barker

    (@xnau)

    That looks like a different issue. What happen when you try to add a new field?

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

The topic ‘Can’t add fields to database’ is closed to new replies.