Well, I really don't know what is the problem here and why it never came out (probably I have a misconfiguration somewhere...)
When I search for some nodes using the Flexinode search, both "sort header" and pager gets an "edit=Array" query string. Now, this problem does not happen with 4.7 because it got a big core change and also because (it seems to me) Flexinode changed to use the core search mechanism.
This patch does not touch Drupal core, but fixes the problem by doing two simple things:
* clears the POST "edit" variable
* adds an encoded string that will be used by the current system
Solving the problem and allowing the correct functionality of both sort and pager.
Hope you like it.
Comments
Comment #1
magico commentedComment #2
Bèr Kessels commentedFirst: watch your coding style
} else {should beSecond: I am not sure if I understand what you are trying to achieve with all the base46 conversions.
Comment #3
Bèr Kessels commentedeerrm that should have been
off course :)
Comment #4
magico commentedWell, what I want is that the serialized array is converted to a base64 string that garanties it will be correctly passed as a query string parameter. I don't know how could I explain better, but you can confirm that this bug exists in Drupal 4.6, just doing the following:
* create a flexinode
* add several nodes, until you have enough items to have more than one page
* do a flexinode search
* try to go, for example, to the page 2
* in the url you'll have "edit=Array"
This code tries to solve this, by "unseting" the edit variable, and changing it for a "string" variable containing the original edit array parameters.
If it's ok for you, I'll work the patch.
Comment #5
Bèr Kessels commentedIts okay with me. Just that I never encountered this solution in Drupal. and that it sounds somewhat hackish. But, if it works, and if it requires only these relative small changes, I am happy to test and commit a patch.
So, yes, please work on the patch a little :)
Comment #6
magico commentedHere it is with the coding style correct. I'm sorry if you find another coding style problem, it's difficult sometimes to adjust the coding styles to different projects (that I do not control).
Comment #7
Bèr Kessels commentedFixed this in Flexinode 4.6 brach. Thanks a lot, and don't mind the coding style too much. Its just that I am quite swamped with flexinode issues, so I am trying to get other people to do as much work as possible: Instead of rewriting the patch myself, I now learned you something abuot Drupal coding style, and saed myself some work :)
Comment #8
Bèr Kessels commentedComment #9
(not verified) commented