Skip Navigation

[Resolved] Cannot use generic field with slug “page”

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

Problem: I am trying to use a generic field in my Form. The field has a slug of page, but when I try to submit the Form I am shown an error stating that the page does not exist.

Solution: Avoid using WordPress-reserved terms like page or post for generic field slugs. See the link below for a more comprehensive list of terms that are reserved in WordPress.

Relevant Documentation:
https://codex.wordpress.org/Reserved_Terms

This support ticket is created 4 years, 2 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)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by umbertoZ 4 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1784589

Hi, I've a standard Toolset form (no custom code) with 10 generic fields. I fill them with URL param, this is my code:

[cred_generic_field type='textfield' field='page']
{
"default":"[wpv-search-term param="wpvpage"]"
}
[/cred_generic_field] 

When I submit the form I get this error message:

This page doesn't seem to exist.
It looks like the link pointing here was faulty. Maybe try searching?

I tested reducing the number of generic fields, filling some of them or all of them, removing the [wpv-search-term], but I still get the error. Sometimes I didn't get it, but I haven't found the pattern.

Is it a bug?

You can check the form on /test/ page.

This is the form editor page:

/wp-admin/post.php?post=712&action=edit

cheers

#1784641

Hey, it seems the problem is the 'page' slug I'm using in the generic field. If I remove it or I don't fill that field the form works fine.

I suppose it conflicts with WP 'page' slug. The strange thing is that I've been using it for a long time, I got the problem yesterday after updating WP and Toolset to the latest version.

cheers

#1786161

Yes, I would avoid using any variation of "page" in a URL parameter since it's a reserved term in WordPress. Depending on the WP version this might create some unexpected issues.

#1786203

My issue is resolved now. Thank you!