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

Filtering using current-path #1

Closed
pixelninja opened this Issue Jan 20, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@pixelninja

pixelninja commented Jan 20, 2015

Apologies if this isn't an Expression Field issue, it could be Symphony related instead.

I am filtering a section based on $current-path to show certain content. This is working perfectly on subpages where current-path is something like /foo, but on the index page where current-path is '/', it is not returning the correct entry and just defaulting to the latest entry ID.

Any ideas? I've been away from Symphony for some time so I am quite rusty :s

Symphony version 2.5.2 and Expression Field version 1.1

@brendo

This comment has been minimized.

Show comment
Hide comment
@brendo

brendo Jan 20, 2015

Member

I'll take a look this evening, I have a project where I need to use this field so will check it out.

Are you using the 'regexp' setting?

Member

brendo commented Jan 20, 2015

I'll take a look this evening, I have a project where I need to use this field so will check it out.

Are you using the 'regexp' setting?

@pixelninja

This comment has been minimized.

Show comment
Hide comment
@pixelninja

pixelninja Jan 21, 2015

Nah not using regexp.

Screenshots of setup, which has worked for me in the past. Shows entry values, and datasource filter.

screen shot 2015-01-21 at 1 08 11 pm
screen shot 2015-01-21 at 1 08 50 pm

pixelninja commented Jan 21, 2015

Nah not using regexp.

Screenshots of setup, which has worked for me in the past. Shows entry values, and datasource filter.

screen shot 2015-01-21 at 1 08 11 pm
screen shot 2015-01-21 at 1 08 50 pm

@brendo

This comment has been minimized.

Show comment
Hide comment
@brendo

brendo Jan 21, 2015

Member

I"m going to use this field to do exactly what you are doing, navigation active states ;) Will let you know :)

Member

brendo commented Jan 21, 2015

I"m going to use this field to do exactly what you are doing, navigation active states ;) Will let you know :)

@brendo

This comment has been minimized.

Show comment
Hide comment
@brendo

brendo Jan 21, 2015

Member

Confirmed, I can reproduce the same result using Expression Field 1.1 and Symphony 2.6 (integration).

It's actually a core bug! The / gets evaluated as 'nothing' in the Datasource class, so then the filter is unset!

Member

brendo commented Jan 21, 2015

Confirmed, I can reproduce the same result using Expression Field 1.1 and Symphony 2.6 (integration).

It's actually a core bug! The / gets evaluated as 'nothing' in the Datasource class, so then the filter is unset!

brendo added a commit to symphonycms/symphony-2 that referenced this issue Jan 21, 2015

@pixelninja

This comment has been minimized.

Show comment
Hide comment
@pixelninja

pixelninja Jan 21, 2015

Brilliant, thanks @brendo. I had a feeling it was core related. I have updated the class.datasource.php file as per your referenced Symphony commit and can confirm it is now working as expected.

Cheers mate!

pixelninja commented Jan 21, 2015

Brilliant, thanks @brendo. I had a feeling it was core related. I have updated the class.datasource.php file as per your referenced Symphony commit and can confirm it is now working as expected.

Cheers mate!

@pixelninja pixelninja closed this Jan 21, 2015

nitriques added a commit to DeuxHuitHuit/symphonycms that referenced this issue Feb 19, 2015

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