Skip Navigation

[Resolved] Layout of custom post doesn’t appear on frontend

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

Problem:

The issue here is that the customer had a custom field that they were displaying on the frontend and whenever this field is empty there would be an error thrown on that particular post.

Solution:

In this case it seems that the field got corrupted and the recommendation was to completely remove and delete that field and recreate it in Types.

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 19 replies, has 2 voices.

Last updated by sinisaB 6 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#620081

I have a problem...

Layout doesn't appear after the administrator approves custom post!
Before it worked well but suddenly doesn't want ...
A custom post is visible before approval on the front end, but after there is only blank page...
It is custom post submitted by the user via frontend CRED form, but everything goes well, data are visible in the backend of custom post and in the preview, but after publishing (admin approval) I am getting a blank page...

Custom post should look like this (successfully an old one post):
hidden link

But this is for all new posts:
hidden link

Thank you in advance,
Sinisa

#620161

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sinisa,

Thank you for contacting our support forum.

This is quite strange as the layout should remain upon post publishing . Did any plugin update before you noticed this issue ?

It could be because of a plugin conflict and as such I would recommend that you temporarily disable all the non-toolset plugins and try again.

If you're still noticing the issue please let me know.

Thanks,
Shane

#620218

Hello Shane,

I deactivated all non-Toolset plugins but there is still the same...
There is no changes, layout page for custom post remains blank after admin approval/publishing...

#620239

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sinisa,

Thanks for updating.

Would you mind providing me with admin access to the site so that I can have a look ? Also one more thing could you try recreating the form ?

Thanks,
Shane

#620271

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2018-02-27 at 4.12.25 PM.png

Hi Sinisa,

I have some good news for you. It seems the error is coming from our Types plugin and since it is a beta we will experience some issues hence why its not recommended to be used on production sites.

However the field in the screenshot needs to be filled out or else it will throw an error in types.

What you can do is to make this field required.

Please try this and let me know if it helps.

Thanks,
Shane

#620436

Hello Shane,

Nice to know that problem is recognized. I spent whole afternoon yesterday in finding error, I catch only headache... 🙂
I forget that I switched to Beta plugins few months ago...
Did you change beta Toolset plugins from the Beta to regular?

That field is for upload of "other images" and it is better to be non-required...
How to leave it with that condition, without error?

#620561

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sinisa,

Its strange that this field throws an error. I would remove it and replace it with a new field.

Our regular versions are still available but the beta changes have not been applied to our production version since there is more work being done on it.

Thanks,
Shane

#620601

I chaged all toolset plugins to "production" but it is the same...
Now I will repace that field with new with existing slug...
WIll inform her about results...

#620615

I've deleted existing problematic field but when I want to put new one with existing slug, I am receiving warning that slug is already used even field is deleted.
What to do to aviod changing in all post and forms?

#620629

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sinisa,

Do you want to try deleting the field completely? This would mean that pre-existing posts that work will lose this field and you may need to add back the data of those fields.

Please let me know and I can advise you of how to delete the field.

Thanks,
Shane

#620654
Type field used.JPG

Huh,I already deleted problematic field for upload images...
I tried to create a new one with existing name and slug, but the system doesn't allow that and there is a message "Warning: field slug already used".

What to do?

P.S.Eventual dataposted with that field isn't problem, beacuse all posts are still test posts... But it should work properly for the future...

#620664
Error after publishing custom post.JPG

P.S.

The system allows me after to create another custom field with same slug as deleted previous (ostale-fotografije), but the problem remains the same...
Custom post (Geo objave) is visible on frontend if status is pending, after publishing page shows "fatal error" now, not any more blank page...
So obviously problem is in image custom field "Ostale fotografije"...
Still "What to do?"
Thanks,
Sinisa

#620677

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sinisa,

Actually when a field is removed from a post group its not fully deleted.

It much be deleted from going to Post Fields -> Post Field Control.

From here you should be able to permanently delete the field so that you can use the slug.

Please let me know if this helps.
Thanks,
Shane

#620696

Hello Shane,

Still the same problem...
I deleted that custom field as you told me (Post field control), after I added again a new field with the same slug, error again...
It looks like this: hidden link

#620722

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sinisa,

I took a different approach by not displaying the field if its empty.

<p>[wpv-conditional if="( $(wpcf-ostale-fotografije) ne '' )"]<strong>Ostale fotografije:</strong></p>
<p>[types field='ostale-fotografije' alt='%%ALT%%' title='%%TITLE%%' size='thumbnail' align='none' resize='proportional' separator=', '][/types]</p>
<p><p/>
[/wpv-conditional]<br />

You posts should start displaying now.

Please let me know if all is well on your side.

Thanks,
Shane