Skip Navigation

[Resolved] Error in beta: types field shortcode for empty image custom field

This thread is resolved. Here is a description of the problem and solution.

Problem: I am experiencing a problem in the beta plugins. I have an image custom field in my custom post type that is not required. I have placed that image field in my Layout using the Types field shortcode. If the current post has no image in the custom image field, a fatal error is shown.

Solution: Update to the latest beta plugins, including Types 3.0-b1

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 19 replies, has 2 voices.

Last updated by sinisaB 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#620753

Hello Christian,

I have some kind of bug or similar...
My custom posts won't appear on the frontend after status is changed from pending to publish (after admin approval and publishing)...
It seems that one of image custom fields named "Ostale fotografije" causes that problem...
That custom post "Geo objave" is visible on the frontend only during PENDING status, or if some image files are uploaded in that field.
If nothing is uploaded there, in that field, custom post is broken on fronted and appears as blank page with "fatal error" message.
Example of broken custom post on frontend: hidden link

I tried to delete that custom field and to create new one but problem exists.

Thanks in advance,
Sinisa

#620934
Notice in view.JPG

Also I'm receiving some repeated "Error notice" inside of every edited view cel on the bottom... Maybe is related with this issue...

Notice: Undefined index: handle in /customers/1/c/5/geoproblem.one/httpd.www/wp-content/plugins/wp-views/embedded/inc/classes/wpv-shortcode-generator.php on line 949

#621043

Hi, can you tell me a bit more?
- You said that the custom post only shows up on the front-end if it's in "pending" status, or if some image was added to the custom field. How is that enforced? Is that set up in Access somehow, or using custom code, or something else?
- Update to the latest betas and try again, let me know the results.

#621076

Hello Christan,

" You said that the custom post only shows up on the front-end if it's in "pending" status, or if some image was added to the custom field. How is that enforced? "
Yes! I don't know how...

I made the update of all Toolset plugins on latest betas, but it is still the same...
I also thought that problem is in Access somehow but it isn't I think...
But we found that custom image field "ostale fotografije" (named on croatian >> "other images") makes that problem.
Everything goes fine IF even one image is uploaded to image field "ostale fotografije", but if it isn't, we are getting that problem... That field isn't required...
All custom fields are imported via CRED post form (CRED form on frontend>>>Custom posts>>>Layout template>>Frontend
How come that one field can produce such error?
I tried to delete that field and to create a new one with the same name/slug but it is the same...

We can put some conditional output in Layout's cell to hide that field and then custom post is published (it is not solution it is a patch :-(), but after I see also a Notice at the bottom of every edited View cell (see the last attachment, it seems that is related with the error notice of a custom post on the frontend...
hidden link
I am working only with Toolset plugins, nothing via scratch or to server directly...

So in short, published custom post produce a blank page with some error message instead of a created Custom post ( created with Post Types and designed with Layout plugin template) IF non-required custom image field "ostale fotografije" isn't filled.
Also, Error Notice is visible on every edited view cell at the bottom whole the time...

#621085

Not sure offhand, it could be a bug in the beta plugins or a conflict with another plugin. Try this first:
- Temporarily activate the Twenty Seventeen theme and deactivate all plugins except Toolset plugins
- Try again. If the problem is resolved, reactivate your theme and plugins one by one until the conflict is revealed
- If the problem was not resolved, I need to take a closer look. Please provide login credentials in the private reply fields here. Let me know which CRED form is used to create these posts, and how I can see the CRED form on the front-end.

#621383
Problematic custom field.JPG
Notice in view.JPG
Custom post Geo objave.JPG
Custom fields for custom post.JPG

Hello!
Ok! I switched from Real estate (Starter child) theme to Twenty Seventeen
I 've deactivated all plugins one by one and I refresh the page (crtl+f5) with the custom post with the error after every plugin deactivation...
Nothin' happens, the problem is still here.

So here is a quick guide:
- custom posts "Geo objave" ( translated from Croatian >> Geo Posts) are created by Toolset Post Type and have custom fields created with Toolset custom fields.
- one of the custom fields is image field "Ostale fotografije" (translated from Croatian >>Other images) which obviously creates a problem on the Custom Post frontend, only in case there is not uploaded any file (image) to that field... If something uploaded there, problem non-exist.
- Example: post without upload in field "Ostale fotografije": hidden link
-Example: post WITH files uploaded in field "Ostale fotografije": hidden link
- also is noticed that every edited view cell has a textual error notice on the bottom of editing window whole the time
- every custom post can be added through backend or via CRED form on this link: hidden link

#621388

Please, I don't see any more option how to send login data privately to you... Thanks!

#621698

Is there any news...?

#621825

Hi, private reply fields are activated again here.

#622162

Okay thanks, I'm able to replicate the repeating image field issue on my own local environment. I will escalate that to my developers as soon as possible so they are aware of the potential bug in the new beta software. If any workaround becomes available, I will let you know as soon as possible. Thanks for the report.

#622166

Thanks Christian,
I'll leave this thread open till some news...
Regrads,
Sinisa

P.S.
If you don't need login data anymore I will change it...
Please contact me if you need to login to site again...

#622193

I don't think I'll need to log in again. My 2nd tier support team reminded me that Layouts is not officially ready to support the M2M betas, and we hope to have a beta version of Layouts available very soon that will offer tighter integration with the beta Types, Views, and CRED plugins. I have added this issue to their checklist, so we will be sure the repeating image field issue is addressed in a future beta version. Thanks for the report. In the meantime, unfortunately I do not have a workaround available but I will update the ticket here if that changes.

#622250

Ok, thank you very much...
I'll wait for an update.
Shane from your support found a solution with the conditional output which hides that field if there is no upload.
But after that, I notice an error on the bottom of every window of views or cred forms etc. So it was the reason why I need to open a new thread about this "bug"...
So I will put that Shane's conditional output as a temporary solution.
Time to time I'll check this thread to see if there any news...

Many thanks,
Sinisa

#624647

Hi, just a quick administrative update. Rather than keep this ticket open, I have set the status as "Fixed in the next release" so I will know that I need to follow up with you when the Layouts beta is released. Keeping the ticket open implies in our system that I am actively working on this, which isn't really accurate in this case. Thanks for understanding.

#624794

Ok. No problem... I hope a new release will be soon... 😉
Thanks for everything!
Sinisa