denshoproject / ddr-public

Web UI for publishing DDR collections.
Other
1 stars 1 forks source link

Object list view for collections improperly displays child entities #185

Closed GeoffFroh closed 2 years ago

GeoffFroh commented 2 years ago

(This is a regression error -- @sarabeckman reported behavior on 11/22/2022. )

The object list view linked from the collection detail page displays all parent and child entities, rather than just parent entities as it should. See, for example:

https://ddr.densho.org/ddr-densho-1000/objects/

and

https://ddr.densho.org/ddr-csujad-30/objects/

(This also results in not being able to see all interviews in collections with a lot of child entities -- e.g., ddr-densho-1000 -- since the list view seems to top out at 10,000 items -- also maybe a bug?)

gjost commented 2 years ago

Looks like something that crept in when I added filters to collection objects lists. Each object (both Entities and Segments) have collection_id and parent_id attributes. I must have attached the lists to collection_id rather than parent_id.

gjost commented 2 years ago

That, or the query is not filtering out segment models.

gjost commented 2 years ago

I modified the view to only search for entity documents, filtering out all the segments. Fix is deployed to production.

gjost commented 2 years ago

The real problem was that production is currently running on the develop branch. We switched to the stage server when we had problems with coyote a couple weeks ago. Stage was running develop and we didn't think to check so these changes went live without a QA process.

I have a script that I run locally to check if our sites are up and that passwords are enabled on stage sites. I've modified it to optionally check for signs that the develop branch is checked out on the production sites.