manuxi / SuluEventBundle

Passing event- and locationsystem based on sulu workshop together in a bundle.
MIT License
5 stars 3 forks source link

SQL Exception on Location List #3

Closed davidgorges closed 1 week ago

davidgorges commented 2 weeks ago

Hi!

After a fresh install (Sulu 2.6.4, Symfony 7.1.3, Postgres) I am getting the following error on /admin/api/locations?page=1&limit=10&fields=name,image,street,number,postalCode,city,state,countryCode,id&flat=true

"An exception occurred while executing a query: SQLSTATE[42703]: Undefined column: 7 ERROR:  column \"sclr_2\" does not exist\nLINE 1: ...event_id IN ($1, $2) GROUP BY a0_.event_id HAVING sclr_2 < $...\n                                                             ^"

This is coming from EvenTranslationRepository findMissingLocaleByIds. I didn't dive any deeper yet.

manuxi commented 2 weeks ago

Hi David, I'm not sure where sclr_2 is coming from. Will take a look at it later on.

manuxi commented 2 weeks ago

Could you provide me with the whole statement?

manuxi commented 2 weeks ago

I fear that there is a problem with Postgres. I can't say for sure, but the column indicates this. Stumbled upon this: https://github.com/Sylius/Sylius/issues/11851 But can't test postgre at the moment since lack of time. Perhaps late in the next month. If you figure out something I'd be eager to get to know the fix.

davidgorges commented 2 weeks ago

Thanks for looking into this and pointing into the right direction! I've opened this PR to fix this error. I'm not sure if the additional grouping by locale can cause issues, I don't have that case yet.

manuxi commented 2 weeks ago

Have to test it in my spare time later.

manuxi commented 1 week ago

Thank you for fixing this!