• Resolved sillinguist

    (@sillinguist)


    This is an awesome plugin. thanks for releasing.

    1st I am a bit new to PODs. and so I through this plugin in just so that I can see what data I have and style it a bit. when I did turn it on, for each CPT instance (I only have one CPT type right now), there is a error which gets thrown, it might be because I have not defined a template yet.

    I expected the content to get listed in an

      . But there is no
      evidence.

    But here is the error:

    Warning: trim() expects parameter 1 to be string, array given in /<private server path>/wp-content/plugins/pods-auto-display/PodsAutoDisplay.php on line 66
    Feature: LocalizationFeature Description Text: The ability to have the FLEx interface in a language you are familiar with. FLEx is fully localized in 8 languages and more contributions are welcome.Left or Right Alignimage: 1

    The Bold sections are my custom field names and the non-bold images are the values.

    http://wordpress.org/plugins/pods-auto-display/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author tysonlt

    (@tysonlt)

    Hi Hugh,

    Thanks for reporting that. Could you please send me your POD? You can export it from Pods and I can have a look at it.

    Because this plugin is in such as early version I haven’t been able to test it with other people’s pods, so thanks for helping out.

    Plugin Author tysonlt

    (@tysonlt)

    Gday,

    Could you try this update:

    $result .= '<ul>';
    foreach ($pod->fields as $field) {
    	$data = $pod->field($field['name']);
    
            /*** NEW CODE AT LINE 66 ***/
    	if (is_array($data) && count($data) > 0) {
    		$data = join(", ", $data);
    	}
            /*** END NEW CODE ***/
    
    	if (strlen(trim($data)) > 0) {
    		$result .= '<li>';
    		$result .= '<b>'. $field['label'] .'</b>: '. $data;
    		$result .= '</li>';
    	}
    }

    I am assuming it is a multi-select relationship field?

    Plugin Author tysonlt

    (@tysonlt)

    Hello,

    I have updated the plugin to 0.4. This will solve the display problems you described. Please update and let me know if there are any more problems.

    Thread Starter sillinguist

    (@sillinguist)

    Thanks for your quick reply.

    It has been a few days since that error. I think I had already altered the POD and deactivated the plugin by the time you replied. I have reinstalled the plugin on another site and I will give it a another go. If I have a problem again I will open a new issue and paste the POD on pastebin.com and link to it from the support forums here.

    Thanks again for your quick reply. I am going to mark this resolved.

    BTW there should be a place on PODs.io where the community can “swap PODs”.

    We’re revamping our packaging standard, once that’s in place, we’ll bring back our Package directory, it’ll allow for much better long-term use of packages, including support for upgrade handling.

    Plugin Author tysonlt

    (@tysonlt)

    G’day Scott! Fancy seeing you here…

    Hugh, the version you tried should probably have been called an alpha version. The latest version should work better, but post back if it doesn’t. Today I am going to add more options to let you control the list output from the settings page, so that will make it more flexible.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error on line 66?’ is closed to new replies.