Closed (fixed)
Project:
Storm
Version:
7.x-1.x-dev
Component:
Storm Person
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
30 Sep 2012 at 21:54 UTC
Updated:
4 Nov 2012 at 17:51 UTC
Jump to comment: Most recent file
Convert SQL queries & rewrite stormperson_validate() - seems the function is not doing what it should entirely.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | storm-1799550-sqlapi-d7-18.patch | 5.38 KB | willwh |
| #18 | storm-1799550-sqlapi-d7-18.patch | 5.38 KB | willwh |
| #16 | storm-1799550-sqlapi-d7-15.patch | 11.08 KB | willwh |
| #13 | storm-1799550-sqlapi-d7.patch | 5.38 KB | willwh |
| #11 | storm-1799550-sqlapi-d7-11.patch | 5.32 KB | juliangb |
Comments
Comment #1
juliangb commentedCan you elaborate your point about stormperson_validate()?
Comment #2
willwh commentedHi julian, my bad, switching between my few local branches, I dropped a few lines in there (not what was in 7.x-1.x-dev) - so you can safely ignore the comment about stormperson_validate()
I am re-writing SQL to d7 api, in bits - haven't had a lot of time up until now, but I will provide patches asap :)
Comment #3
willwh commentedUpdating the issue title to better reflect the issue.
Fixed up the stormperson_user_autocomplete() syntax.
Comment #4
willwh commentedAdding missing query limit, using ->range();
Comment #5
juliangb commentedLooks here like we're changing from string% to %string%
One bit of trailing whitespace that's been added.
Comment #6
willwh commentedThis patch is a little better.
I am a little stuck here though - _stormperson_user_load()
This always seem to be returning $account->uid = 0; - as the user_uid is always 0 on stormperson_insert($node)
I am not quite sure how to go about debugging this, any pointers appreciated :)
Comment #7
willwh commentedTrying to post a patch that actually has correctly line endings etc.
Comment #9
willwh commentedHere's a patch for the ajax load of users by name & validation query.
Still lots of work to be done on Storm Person :)
Comment #11
juliangb commentedI think there was a rogue bracket in #9. This should fix.
Comment #12
juliangb commentedA few questions on this patch:
Need to execute() query.
Needs to be tagged for a node_access check.
$node->username or $node->user_name ?
Comment #13
willwh commentedMaybe this'll do the job :)
Comment #15
esoteric1 commented#13: storm-1799550-sqlapi-d7.patch queued for re-testing.
Comment #16
willwh commentedOk, hopefully this is good :)
Comment #17
juliangb commentedLooks like there is an old patch included in the diff!
Also - would you be able to briefly explain the parts that this fix to aid in testing?
Comment #18
willwh commentedYup surely!
This should repair the "User" auto complete field in the "Add Storm Person" form - although - stormperson_insert() does not properly insert the user_uid correctly.
It may seem like stormperson_validate() is broken.
stormperson_validate() is not broken! If you manually set the user_uid in the db, for a Storm Person, to match the uid of a drupal user - you'll see it works correctly. i.e. You should not get this user returned in the "User" autocomplete field.
If you manually type the Drupal Users name in to the User field and submit, it will correctly throw form_set_error() as it should.
I could really use some help in getting the rest of stormperson.module sorted!
Comment #19
willwh commentedD'oh, let's test this puppy :)
Comment #20
juliangb commentedI tried to test this, but the Storm Person form isn't really working yet so I didn't see a form.
Do you see a form etc?
Comment #21
willwh commentedYes, insofar I see Salutation, Name, Username, Email, Phone...
I'll take another look at this when I get home!
Comment #22
juliangb commentedI don't see those fields - so wondering if you've fixed this bit on your dev version?
Comment #23
willwh commentedHi julian, I guess that must be fixed in this patch: http://drupal.org/node/1798036#comment-6629906
Comment #24
juliangb commentedOnce I'd a) committed your other patch and b) refreshed my storm install the fields were there! Not sure which fixed, but meant that I tested and committed your patch.
For me, it inserted the user_uid correctly, but throws an error on the user_nid. After some investigations, I found this was a bug present in 6.x-2.x also. Will create a separate issue for that.
What are you going to work on next? ;-)
Comment #25
willwh commentedGetting you in to #drupal-storm when you are around :P
Hah!