Ajax view $vars are not populated with request query elements #10667

Closed
hypeJunction opened this Issue Dec 23, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@hypeJunction
Contributor

hypeJunction commented Dec 23, 2016

Can't tell for sure, but it looks like using ajax.view() with data doesn't add data to $vars

@jdalsem

This comment has been minimized.

Show comment
Hide comment
@jdalsem

jdalsem Dec 23, 2016

Member
Member

jdalsem commented Dec 23, 2016

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Dec 23, 2016

fix(ajax): elgg/Ajax view() and form() set $vars as expected
The `elgg/Ajax` module was auto-converting any request with `options.data`
to use the `POST` method. This makes sense for things like actions, which
may send a large amount of form data, but it caused `$vars` to not be
populated as expected because only `GET` params are injected.

If you specified `options.data` with these methods before, note the server
will no longer receive this data as `$_POST` on the server.

Fixes #10667
@mrclay

This comment has been minimized.

Show comment
Hide comment
Member

mrclay commented Dec 23, 2016

See #10672

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Dec 24, 2016

fix(ajax): elgg/Ajax view() and form() set $vars as expected
The `elgg/Ajax` module was auto-converting any request with `options.data`
to use the `POST` method. This makes sense for things like actions, which
may send a large amount of form data, but it caused `$vars` to not be
populated as expected because only `GET` params are injected.

If you specified `options.data` with these methods before, note the server
will no longer receive this data as `$_POST` on the server.

Fixes #10667
@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Dec 29, 2016

Member

Fixed #10672

Member

mrclay commented Dec 29, 2016

Fixed #10672

@mrclay mrclay closed this Dec 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment