Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow fields to be sorted by orderby … #2350

Merged
merged 2 commits into from
Sep 23, 2014

Conversation

jamesgol
Copy link
Contributor

Two separate but connected issues. First if orderby is passed then the $data array is
never populated. Then looping through $ids will always give it results sorted by priority
in the relationships field (data returned by lookup_related_items)

Fixes #2277

Two separate but connected issues.  First if orderby is passed then the $data array is
never populated.  Then looping through $ids will always give it results sorted by priority
in the relationships field (data returned by lookup_related_items)

Fixes pods-framework#2277
@jamesgol
Copy link
Contributor Author

I'm also not sure why $items isn't just returned or copied over, but with some of the weird complexity in pods there might be a reason.

@Shelob9
Copy link
Contributor

Shelob9 commented Sep 10, 2014

@sc0ttkclark Do you find any of the concerns he raises to be valid?

If this works (I will test) I think this and a few other little things could be worth a very small point release. People want what this fixes all the time in forums and the work around that I recommend sucks.

@Shelob9 Shelob9 self-assigned this Sep 17, 2014
@Shelob9
Copy link
Contributor

Shelob9 commented Sep 17, 2014

When I checkout this branch I get Parse error: syntax error, unexpected 'public' (T_PUBLIC) in ~/classes/Pods.php on line 1588 error in post editor's Pods section. That's line is the beginning of the method after field, so the field method must be missing a brace.

Shelob9 added a commit that referenced this pull request Sep 23, 2014
Allow fields to be sorted by orderby & fix #2277
@Shelob9 Shelob9 merged commit 5611248 into pods-framework:2.x Sep 23, 2014
@Shelob9
Copy link
Contributor

Shelob9 commented Sep 23, 2014

I tested this and it resolves #2277

I am merging to 2.X so when this issue comes up in forums (as it does a lot) @jimtrue and I can point people to latest download. I am also leaving #2277 open until @jamesgol submits a new PR against 3.0-unstable for this and that gets merged.

@sc0ttkclark
Copy link
Member

Sounds good

jamesgol added a commit to jamesgol/pods that referenced this pull request Sep 27, 2014
@jamesgol jamesgol deleted the orderbyfield branch November 3, 2014 17:20
jamesgol added a commit that referenced this pull request Jan 3, 2015
In PR #2350 I attempted to fix bug #2277, and it did but also removed the sorting by the weight.

This should fix #2567 as well as not regressing the fix for #2277
@sc0ttkclark sc0ttkclark modified the milestone: Pods 2.5.3 May 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't orderby with pods::field for relationship field
3 participants