Support for POST method

freeman - April 4, 2008 - 18:16
Project:Prepopulate
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:patch (to be ported)
Description

Thanks for this module.

The only issue I face so far is that with a long list of fields and/or field data, I get a watchdog warning about overlong referer when I submit the new node form. This is because of use of URL parameters passed via the GET method.

Could we add a POST method to give users a choice of submitting the prepopulated fields without encountering the overlong fields/data URL warning ?

I did a quick hack to convert from $_GET to $_POST. Additional, I added a urldecode on data that contains % (which arises when a space was encountered). So far this works with my data which are either alphanumeric+space or decimal numeric.

If there's demand, perhaps, we could incorporate a dual handling for GET and POST methods, whereby if no URL parameters were found, it looks for POST variables. Or alternatively, just a simple GET vs POST priority (whichever has at least one variable); OR even a combination of both method's variables whereupon duplicate variables encountered are resolved via priority of one over the other.

Any interest in this ?

Mine has mainly been to avoid the watchdog warnings clog up my logs.

#1

add1sun - April 6, 2008 - 01:44
Version:5.x-1.3» 6.x-1.x-dev

If you can supply a patch that moves in this direction, I'd definitely look it over. A patch for new features should go against HEAD so I'm changing the Version on the issue.

#2

Rob Loach - August 4, 2009 - 19:19
Priority:minor» normal

Prepopulate rocks my socks off, and so do POST requests. Subscribe.

#3

Rob Loach - August 7, 2009 - 22:45
Status:active» needs review

Moved over from $_GET to $_REQUEST.

AttachmentSize
242749.patch 2.96 KB

#4

Rob Loach - September 29, 2009 - 16:18
Priority:normal» critical

Ping! Is this module maintained? Last commit was in 2008. Does it need help? If so, I'm willing to help out....

#5

Rob Loach - September 29, 2009 - 18:22

Here it is for both HEAD (Drupal 6) and DRUPAL-5 branches with documentation.

AttachmentSize
242749-drupal5.patch 1.8 KB
242749-drupal6.patch 1.81 KB

#6

Rob Loach - October 7, 2009 - 22:35
Status:needs review» reviewed & tested by the community

Sticking it in the RTBC queue.

#7

jbrauer - October 7, 2009 - 23:25
Priority:critical» normal
Status:reviewed & tested by the community» patch (to be ported)

Committed to 6.x-1.x branch. Marking as to be ported for 5.x and 6.x-2.x branches which I need to get the branches coordinated.

#8

Rob Loach - October 8, 2009 - 00:51

The DRUPAL-5 patch is right here, from #5:
http://drupal.org/files/issues/242749-drupal5.patch

#9

jbrauer - October 8, 2009 - 02:03

Thanks Rob... Sorry I wasn't more clear. I'm not setup with Drupal 5 at the moment but will be soon and will get your Drupal 5 patch when I do.

#10

Rob Loach - October 8, 2009 - 03:57

Ah, haha :-) .

 
 

Drupal is a registered trademark of Dries Buytaert.