eZ Community » Forums » eZ Publish 5 Platform » issues searching for content by field...
expandshrink

issues searching for content by field value?

issues searching for content by field value?

Wednesday 24 April 2013 11:16:40 am - 9 replies

Hi,

I'm currently experiencing issues when trying to search for content based on the field of a class. From the looks of what I can see currently the pdo query being generated is invalid and has a blank column within in.

Is this something i'm doing wrong, or a bug within the core?

The exception thats getting thrown is:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause'

I've uploaded the code i'm currently using is here: https://gist.github.com/ripplecburton/5450840

Any help anyone can provide would be great!

Wednesday 24 April 2013 12:01:53 pm

Hi Chris

Difficult to say at first sight, since it highly depends on which fieldtypes you have on your ContentType... Can you provide a bit more information on that please ?

Wednesday 24 April 2013 12:06:43 pm

BTW, which version are you using ?

Wednesday 24 April 2013 12:33:05 pm

Hi, 

I've packaged up the class i'm using to test here:

https://www.dropbox.com/s/fbghwv0nbak44ja/test_class-1.0-1.ezpkg

I've created 2 items in the "Home" content structure location. If i remove the Criterion for searching on title/description the results return all my objects. However, when its added in it returns a PDO error.

Let me know if you need any more information.

Thanks

Wednesday 24 April 2013 12:45:02 pm

I'm using the latest community version (2013.4)

 

Thanks

Wednesday 24 April 2013 1:08:08 pm

I think I've found the issue.

I had other classes with fields with the same identifier value (There were other classes with the "title" field). It seems as though the search service is taking these fields into account when performing the search.

Do field identifiers in each class always need to be globally unique throughout the application or is this an issue with the way the queries are built?

Wednesday 24 April 2013 2:00:09 pm

Mmm, this is likely to be a bug... Can you please report an issue ?

Thanks

Thursday 25 April 2013 11:28:07 am

Issue reported : https://jira.ez.no/browse/EZP-20768

Thursday 25 April 2013 11:32:32 am

Pull request: https://github.com/ezsystems/ezpublish-kernel/pull/320

Wednesday 01 May 2013 4:29:11 pm

Great, this works fine now

 

Thanks

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from