Support » Plugin: User Submitted Posts » Error message

  • Resolved bobjgarrett

    (@bobjgarrett)


    Any idea why I am getting this error multiple times:
    PHP Notice: Trying to access array offset on value of type bool in C:\Inetpub\vhosts\xxxx\httpdocs\wp-content\plugins\user-submitted-posts\library\core-functions.php on line 84

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Glad to help. That is not an “error”, it is a “notice” just fyi.

    Looking at the mentioned line of code, it looks like there is a problem with the configuration of the following setting:

    Auto-Display Content > Image Markup

    Specifically, the notice refers to %%thumb%%, which is a shortcode for the thumbnail-size version of the image. It sounds like maybe the thumbnail size does not exist for some reason.

    You can verify this with a quick test: replace the “Image Markup” setting with just something static like <img src="https://example.com/image.jpg">. Then save changes and try again; the PHP notice should stop.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    Thanks for the reply which is correct.
    I now see that I changed the post to include a video (not sure now how I did that!) so there is no thumbnail. Is there any way to create one?

    Plugin Author Jeff Starr

    (@specialk)

    Yes it’s provided by WordPress itself. Exactly “how” it’s added depends on whether you are using the Gutenberg Block Editor, or the Classic Editor when editing/writing posts. For Gutenberg, check out this post. For Classic Editor, just click on “Set featured image” in the “Featured Image” meta box on the “Edit” screen for any post.

    I hope this helps. Let me know if I can provide any further infos, glad to help anytime.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    Thanks for your advice.
    This is a bit of a strange one as the featured image is appearing as the second thumbnail, the first thumbnail is the one causing the file error. I think the first thumbnail is trying to use a thumbnail of a video I added to the post in the editor.
    You can it here: https://www.ccrc.co.uk/public-forum/ and scroll down towards the bottom.
    I would probably not have spotted the error except having changed the site’s theme I am working through various bugs which have arisen.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    A further thought, maybe it is not User Submitted posts causing the error but the plugin used to display the posts?

    Plugin Author Jeff Starr

    (@specialk)

    Yeah maybe, would be worth checking out.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    Checked and it is User Submitted Fields. I would like to change which photos are shown for this post but cannot find how to do this. I note in another thread you describe the images as being custom fields. Is there any way to modify these once the post is published as I cannot see how to do so.

    Plugin Author Jeff Starr

    (@specialk)

    Yes, all custom fields can be accessed and if needed modified via the “Custom Fields” meta box. If using the Gutenberg Block Editor, you can visit Options > Preferences > Panels, and then check the box to display the custom fields. Note that this is for the current version of WordPress and is subject to change.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    This is getting more weird by the minute!
    I have now deleted the one image reference from the custom fields but the image that works still appears and the image that doesn’t appear but has a broken link is also still there.
    I fear the data record is somehow corrupted and don’t want to do any more, so will live with the error.
    I’d recreate the whole post and backdate it but that would create an alert to members who will then wonder what is going on.
    Thanks for your help anyway.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.