WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content Type Manager
User field cannot be repeatable. (4 posts)

  1. webpoga
    Member
    Posted 1 year ago #

    Catchable fatal error: Object of class stdClass could not be converted to string in /home/website/public_html/wp-content/plugins/custom-content-type-manager/includes/CCTM.php on line 1827

    That's the error I get when adding a new content using a content type that has repeatable user field.

    http://wordpress.org/extend/plugins/custom-content-type-manager/

  2. webpoga
    Member
    Posted 1 year ago #

    In fact, even making the field "not" repeatable would not resolve the problem. Someone?

  3. fireproofsocks
    Member
    Plugin Author

    Posted 1 year ago #

    Please file this in the bug-tracker: it is a bug. And please: ALWAYS include your version number when talking about issues with any plugin. It makes your requests much easier to respond to.

    For PART of the fix, you can edit line above (1826) of your CCTM.php file. Change the line from this:

    if (!is_array($value)) {

    to this:

    if (is_scalar($value)) {

    ... the rest I'm looking into...

  4. fireproofsocks
    Member
    Plugin Author

    Posted 1 year ago #

    The other part of the fix is inside the fields/user.php file.

    Around line 148, you need to change the code from this:

    $hash['value'] = $o->ID;
    
    foreach ($o as $k => $v) {

    To this:

    $hash['value'] = $o->data->ID;
    
    foreach ($o->data as $k => $v) {

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic