I'm getting the following SQL error when trying to simply order related entries in a Matrix block. Anyway around this?
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'sortOrder' in order clause is ambiguous. The SQL statement executed was: SELECT
elements
.id
,elements
.type
,elements
.enabled
,elements
.archived
,elements
.dateCreated
,elements
.dateUpdated
, ...
This is what's throwing the error:
{% set package = craft.entries({
relatedTo: block,
order: 'sortOrder'}) %}
order: 'sortOrder'
it does that by default when you access related entries. Here is another post that may be of help. craftcms.stackexchange.com/questions/4654/…