Skip Navigation

[Gelöst] REST API not expose custom fields to toolset-meta for pages

This support ticket is created vor 4 Jahren, 6 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von rainerW vor 4 Jahren, 6 Monaten.

Assistiert von: Waqar.

Author
Artikel
#1613853

Tell us what you are trying to do?
I want my custom fields exposed with the RestAPI for my pages. Pages have attached Fieldgroups

Is there any documentation that you are following?
https://toolset.com/documentation/programmer-reference/toolset-integration-with-the-rest-api/
I'd set "Enabling exposing to REST API" to true, and add the add_filter( 'toolset_rest_run_exposure_filters', '__return_true' );

What is the link to your site?
The page versteckter Link has added custom fields as you can find in the table with "Name","Hersteller" etc.

But within the rest versteckter Link there is no toolset-meta.

can you give me a hint how to get them there?

Kind Regards
Rainer

#1614883

Hi Rainer,

Thank you for contacting us and I'd be happy to assist.

The steps that you've shared are correct and any custom fields added to the page through Toolset Types plugin should be available in the REST API's response.

Can you please make sure that these fields that you're expecting to see in the REST API's response have been added through Toolset Types plugin and they are attached to the target page, directly?

If you have a positive confirmation for both those points, I'll suggest the following steps for troubleshooting:

1. Please make sure that WordPress, active theme, and plugins are all updated to the latest versions.

2. It would be interesting to test this with all non-Toolset plugins disabled and a default theme like Twenty Twenty.

If it's fixed, you can start adding the disabled items, one-by-one, to narrow down to a possible conflicting one.

3. In case the issue still persists, I'll need to see how these fields are set up in the admin area, in order to reproduce this on a test website.

Please let me know how it goes and I've set your next reply as private.

regards,
Waqar

#1614995

Hi Waqar,

all your advices are not leading to a positive result.

but i figured out why this happend - the "REST API" button is not stored to DB - in frontend it says "ok" but not stored inside DB.
I updated DB directly and the toolset-meta is now available in the REST API

Regards Rainer