ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Filtering interface does not appear on tables with three or more linked tables #732

Closed jajwilson closed 8 years ago

jajwilson commented 8 years ago

In the editing interface, open a table which has three or more linked tables. Note that the 'Filter Results' heading is displayed, but not the actual filtering options. Apologies if its not the 3-or-more linked tables causing this, but that's the only consistent element that I've spotted where this bug occurs.

thestoat commented 8 years ago

Is it possible to add one of the offending databases here?

jajwilson commented 8 years ago

The db where I've spotted this is not to be publicly shared as yet (even though it's only got a small amount of data in it so far). I'll send it to you and Scott via Oxfile.

jajwilson commented 8 years ago

Sorry - not thinking clearly. Might as well just add you both as members of the version I've uploaded to Dev. The Database in question is in the project 'Standard Test'. It's called 'Resistance is futile 2', and the tables to look at are: tblrelationships and tblpersons.

Ah, it seems that you are already a member of this project Dave whilst Scott is 'pending'. I'll try removing you Scott and then adding you again so that you get a fresh invitation.

scottbw commented 8 years ago

My account on Dev doesn't seem to work properly - all the emails tell me I haven't registered yet ... but when I log in, I'm clearly there!

jajwilson commented 8 years ago

Dave - is there any way to reset Scott's account?

thestoat commented 8 years ago

I have just looked at every table in that database and I can see no problem. Filtering options are available in all.

Scott - please forward to me one of the offending emails

jajwilson commented 8 years ago

That's odd. Here's a screenshot showing the lack of any filtering option for tblpersons:

nofilteroptions

thestoat commented 8 years ago

It works ok for me on Firefox and Safari on Mac. It also works fine with Chrome and Firefox on Linux. Can you try with different browsers and paste your results.

jajwilson commented 8 years ago

How strange. Obvs I'm only using Windows 7, but here are the results on Firefox and IE... Firefox:

nofilteronfirefox

And IE:

nofilterie

jajwilson commented 8 years ago

Any idea why there is a 'null' message below the tables in addition to the lack of a filter?

scottbw commented 8 years ago

Can you open the Javascript console and see if there are any error messages there?

jajwilson commented 8 years ago

Aha, yet there is. I see: "RedQueryBuilder-0.js:961 Uncaught java.sql.SQLException: In SELECT "x0".* FROM "tblpersons" "x0" WHERE ("x0"."Notes" = ?) at 13 wanted identifier"

scottbw commented 8 years ago

Hmm ... this is an error you get in RQB when asking it to do wildcards against a single table ("x0".*). Which usually never happens as the code in the table view contains a workaround for it.

Is this a query or a table you're filtering?

jajwilson commented 8 years ago

I'm just in the table editing view - I can't filter anything as the filtering interface isn't being displayed. That's the mystery. I get the same error when I navigate to other tables with three or more related tables. I don't see any error in tables with two or fewer related tables.

thestoat commented 8 years ago

I got rid of the 'null' message.

scottbw commented 8 years ago

I've managed to narrow it down - I can replicate the bug - it occurs on tables which have multiple foreign keys targeting the same foreign table. E.g. item.category = category.id and item.category2 = category.id.

scottbw commented 8 years ago

OK, its another label conflict. I can solve it by having the labels look like this:

"category (category1) ..." "category (category2) ..."

... which is probably sensible anyway.

scottbw commented 8 years ago

OK, I've checked in a fix for this to try out.

jajwilson commented 8 years ago

Hmm. Still can't see the filter options for the 'Resistance if Futile 2' db, in the 'Standard Test' project - see tables tblpersons and tblrelationships. You should have access: https://dev.ords.ox.ac.uk/ordsProjectNode/database.jsp?dbProjectId=591697&lid=1254892

By the way, whilst you're at it could you rename the 'Filter Results' heading to 'Filter' - the form is grammatically ambiguous!

scottbw commented 8 years ago

For some reason I can't actually get to the tables in that db - it just redirects me to the front page

scottbw commented 8 years ago

Argh, the reason is we aren't seeing the fixed code running on DEV because Jenkins seems to be down. I can't see any jobs defined or running.

jajwilson commented 8 years ago

Great. Looks like its working.