Skip Navigation

[Closed] Custom fields not appearing in editor

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 10 replies, has 2 voices.

Last updated by peterv-6 1 year, 1 month ago.

Assisted by: Nigel.

Author
Posts
#2662929

I am trying to: figure out what has gone wrong with forms to create posts on my site. I have a post type "Announcements" and have a bundle of problems with this post type. People who own Company profiles on my website can make announcements for thteir company.

The First problem I noticed was that when I click the button to create an announcement for a company with the front end form I started getting a critical error. (the form had been working for years.) I did some experimenting and noticed that the form still works for my own company that has a profile on the website.

To overcome the critical error problem I tried making an announcement from WP-Admin and discovered that the custom fields that used to appear in the editor were no longer there.

I also tested creating an announcement for my company from the front end form which worked fine. When I edited this announcement in the back end the custom fields appeared.

I have tried clearing my sites's cache, which made no difference.

I am completely puzzled.

#2662953

I just wanted to say my site is hosted with WPEngine who do not allow Duplicator

#2662973

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Peter

Do you have more details about the critical error that occurred? Do you have the error and call stack from the PHP debug log?

Is the problem with the visibility of the custom fields limited to a particular field group? (You can assign more than one field group to a post type; if you add another field group to the Announcement posts with a dummy field, does that display in the editor normally, or it is also missing?)

#2663061

Hi Nigel

Where do I find the error and call stack from the PHP debug log?

I currently don't use field groups... I have fields used exclusively with each post type so all fields for announcements are currently absent... except from existing announcements if I go to edit them or the new posts I create from my company's profile.

#2663119

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2023-11-10 at 15.09.11.png
Screenshot 2023-11-10 at 15.02.35.png

It is not possible to use Toolset custom fields without first creating a custom field group, and then adding fields to that field group. You can then assign the field group to some post type.

See this page: https://toolset.com/course-lesson/creating-custom-fields/

I logged into your site and went to Toolset > Custom Fields, where I can see that you have 2 custom field groups assigned to the Announcements post type (screenshot).

The first is itself called Announcements, and the second is called Field Group for Announcements. But this second field group is empty, it doesn't include any custom fields, it can be deleted.

Returning to the first field group, I went to the list of Announcement posts and edited the first one ("‘First Mover’ Delloop introduces new eCommerce Concept for Retailers").

Scrolling down I find the Announcements fields, as can be seen in the second screenshot.

So there doesn't appear to be a problem with the custom fields on the back end.

Can you please list the test steps that would be needed to test the front-end form that is producing the error? We can test submitting it, and check for errors. (We will need to add a plugin to be able to turn on the debug log and inspect it, if that's okay.)

#2663909
Screen Shot 2023-11-13 at 12.50.06 pm.png
FireShot Capture 028 - Add New Announcement ‹ Techboard — WordPress - techboard.com.au.jpg

Nigel

I forgot I had the 2 groups... I have deleted the one I wasn't using... "partner announcements"

Yes I can see that the field group announcements is visible as in your second image but when you go to "add new" announcement, the custom fields in the Announcements field group are not visible.

I also attach an image of the most recent announcement made... which show the announcements fields... I did this by starting as an announcement for Techboard and then edited which profile the announcement was to be related to.

In terms of the front end form, I have set you up as owner of two profiles you can view when you visit: hidden link

If you click on the "Make an Announcement" button to the right of each company logo you will see that Yolo's gives you a critical error but Techboard's brings up the front end form as it should.

Puzzling.

I hope you can shed some light.

Cheers

Peter

#2663927

Nigel I should add... please don't actually create an announcement... unless you delete it straight away.

Thanks

Peter

#2664015

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Peter

I checked when creating a new Announcement post in the back end and you are right, the field group was missing.

I went to the list of field groups at Toolset > Custom Fields where it showed that the field group was assigned to two post types, Announcements as well as partner-announcements. But when I edited the field group it showed that it was set to only show for the Announcements post type, so something looked wrong there, and I re-saved the field group.

It nows shows as only applying to the Announcements post type, and when I went to create a new announcement post the field group was shown as expected.

I suspect that was the issue, so I haven't tested trying to publish the front end forms.

If there are still issues with those, let me know and I'll look into them.

#2664041
Screen Shot 2023-11-13 at 5.58.45 pm.png

Nigel

OK so 1 down... Back end working... thanks so much.

Front end forms still being weird... Techboard Announcements from Front end works for me as Administrator, but I cannot use front end forms for other companies... I still get the critical error message.

The Front end forms are accessible from the hidden link link or from inside the company profiles... under the company logo see for example hidden link

Peter

#2664087

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I tried to create an announcement from the fetch profile and it reported an error.

I added a file manager plugin to your site so that I could check the debug log, and I can see that the error originates in the child theme (sparkling child) functions.php file.

I downloaded that file to see if I could spot the problem, but unusually that file is compressed—you don't normally compress PHP files—making it hard to read and meaning it's not possible to pin-point which line of code is responsible for the error.

Given that this is a live site I suggest you create a copy of the site on a staging server.

I expect that you will find if you switch to the parent theme and re-test the error shouldn't occur.

If the person who developed the child theme is still available hopefully they can identify the cause of the problem.

#2664847

Nigel

I have copied the production site onto our test site and can confirm that switching themes has resolved the problem... I will get the developer who worked on the child theme to see if he can sort out the issue.

Thank you.

The topic ‘[Closed] Custom fields not appearing in editor’ is closed to new replies.