Note: I am not sure yet if this is an ECK issue or a Views issue

Problem/Motivation

When creating a view that uses a context filter on the change property (the last time the entity was updated) there is an SQL error and nothing is displayed.

Steps to Reproduce

Create an entity type with the change and create property
Create a view that accepts a url pram as an argument to query against the change or create property
Enter a value into the context filter, if in the preview screen you will see a sql error message, if not no results will be displayed
For MySQL an example of the "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '20160701') ))) subquery' at line 1"
Notice there is no field before the = '' part of the query
Attached to this issue is an export of an Entity and View (using features but repackaged as a zip) that will trigger this error.

Proposed resolution

Add the field to make the SQL statement valid.
It should be noted this works as expected when using the change property from the "FILTER CRITERIA"

CommentFileSizeAuthor
ECK_Error.png146.8 KBcweldon
eck_views_bug.zip1.98 KBcweldon

Comments

cweldon created an issue. See original summary.

cweldon’s picture

Taking another look at this it looks like "real_field" is not being set correctly and the formula is also not being set correctly. Using X-Debug I can stop and add these values and the query is built correctly and works as expected. I am not sure where this should be set in the flow of execution

cweldon’s picture

Status: Active » Postponed

I think this may be a views issue so I am putting this on hold for now

dieterholvoet’s picture

Status: Postponed » Closed (won't fix)

We're dropping support for Drupal 7 since it has officially reached end of life on the 5th of January 2025.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.