WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#9140 closed defect (bug) (worksforme)

Using page to get form data broken in 2.7

Reported by: benjamin.lupu Owned by: westi
Milestone: Priority: normal
Severity: major Version: 2.7
Component: Template Keywords:
Focuses: Cc:

Description

Up to the 2.6.5, the following works :

  • Use a page permalink as action for a form (eg. embedded into the sidebar or in another page)
  • $_POST catches form data without problem
  • In order to do so, you have to create a page template for your theme with the correct PHP code to get the data

The same procedure doesn't work anymore in the 2.7 (and the 2.7.1).

  • $_POST is always empty

This feature is very handy to create simple forms (eg. contact form) respecting Wordpress native mechanisms.

Change History (2)

comment:1 westi5 years ago

  • Cc reporter-feedback added
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

Please share example Page Template and plugin code you are using so we can reproduce your issue.

comment:2 Denis-de-Bernardy5 years ago

  • Keywords form template page submit custom removed
  • Milestone 2.8 deleted
  • Resolution set to worksforme
  • Status changed from assigned to closed

99.99999% certain this is due to a redirect being enforced due to an inconsistent user_trailingslashit() pref.

Note: See TracTickets for help on using tickets.