Support » Plugin: Pods - Custom Content Types and Fields » Error when using multiple images

  • Resolved cgdannie

    (@cgdannie)


    Hello,

    I suddenly get errors when I want to save a pods entry with multiple images in a field with the type File / Image / Video. I can add one image fine but if I add more and save the pods item I get the following error:

    Notice: Array to string conversion in /mnt/web217/e3/08/58263008/htdocs/WordPress_SecureMode_01/wp-content/plugins/pods/classes/PodsAPI.php on line 3754
    Notice: Array to string conversion in /mnt/web217/e3/08/58263008/htdocs/WordPress_SecureMode_01/wp-content/plugins/pods/classes/PodsAPI.php on line 3754 Warning: Cannot modify header information – headers already sent by (output started at /mnt/web217/e3/08/58263008/htdocs/WordPress_SecureMode_01/wp-content/plugins/pods/classes/PodsAPI.php:3754) in /mnt/web217/e3/08/58263008/htdocs/WordPress_SecureMode_01/wp-includes/pluggable.php on line 1210

    This worked all fine before and I dont think, that I changed anything in pods. But now I get the error on saving old pods items again.

    Please help me.

    • This topic was modified 2 years ago by  cgdannie.
Viewing 8 replies - 1 through 8 (of 8 total)
  • cgdannie

    (@cgdannie)

    I am also noticing, that after updating a pods item (and getting the above error) I no see a double entry for the pods item when displaying it with the pods list item widget. In the normal list of all pods items I dont have a double entry.

    cgdannie

    (@cgdannie)

    I am not sure if this is related, but if I insert the following code in a templete

    [if signatur]
        <div class="signatur">
            <img src="{@signatur._src.medium}" alt="Signatur von {@post_title}">
        </div>
    [/if]

    I get the following output on the page using the pods list widget with this template:

    <div class="signatur">
        <img src(unknown) alt="Signatur von Johan Wolfgang von Goethe">
    </div>

    If I remove the if block, I get the correct image. I tried al differnt variants of the magic tag. Even @signatur.img} does not work.

    Plugin Author Jim True

    (@jimtrue)

    First on the errors with multiple images: Have you tried deactivating other plugins first to make sure there are no other plugin conflicts?
    Was this a recent update to 2.6.9 and you started seeing the issue?

    It’s highly possible you got a corrupt install of the update, so I’m going to suggest deactivating Pods, deleting the wp-content/plugins/pods/ directory and re-installing Pods from the WordPress.org repository. This will keep your data intact and let you test to see if the issue was in the copy of the plugin. Usually very odd errors that suddenly crop up can be related to a bad update from the WordPress.org repository. It doesn’t happen often, but it happens often enough that I’ve seen the issue a lot.

    On your second question: Is this a Single Select Image or a Multiple Select Image?

    cgdannie

    (@cgdannie)

    Thank you for your fast response.

    I am on version 2.6.9. But the last time, I edited somtheing is maybe a month back. So I cannot say whether the error was already present before the update.

    I reinstalled the plugin and deactived all other plugins like you said but this did not change anything about the error.

    On the second question: it is a single select image.

    Edit:
    Is it possible to provide me an older version of the plugin to test wheather the problems are a result of the update?

    Edit 2:
    I was able to reproduce the seccond problem with the if block on a different system with the same version of pods. But I was not able to reproduce the first error.

    • This reply was modified 2 years ago by  cgdannie.
    • This reply was modified 2 years ago by  cgdannie.
    mgratch

    (@brokenflipside)

    @jimtrue I can confirm this is a bug.

    I was able to reproduce locally on a fresh local VVV install.
    nothing but pods installed.
    1 post type added (artwork)
    1 field added – file (slide show images)
    only setting change was to set it to multiple files

    I ensured that define('WP_DEBUG', true);
    Added 4 images to slide_show_images
    debug log displayed the notice

    Plugin Author Jim True

    (@jimtrue)

    Thanks for doing the verification! We have another developer who was able to replicate your issue, so not sure why I couldn’t (I blame Friday evening!).

    You can grab 2.6.8 from this link: https://wordpress.org/plugins/pods/advanced/
    – Bottom of that page, Previous Versions and select 2.6.8 from the drop-down select.

    I think your 2nd issue is either related to THIS bug: https://github.com/pods-framework/pods/issues/4308

    Or is related to something I was seeing sporadically in reference to IF and single select images that I saw in both 2.6.8 and 2.6.9

    Plugin Contributor Bernhard Gronau

    (@quasel)

    Github Issue: https://github.com/pods-framework/pods/issues/4313
    and there is already a patch awaiting review!

    Plugin Author Jim True

    (@jimtrue)

    @cgdannie This has been merged with our latest code build https://pods.io/latest/ and will be included in the next update. I’m closing this ticket as resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error when using multiple images’ is closed to new replies.