datagov-cz / ontoGrapher

Tento repozitář je udržován v rámci projektu OPZ č. CZ.03.4.74/0.0/0.0/15_025/0013983.
Mozilla Public License 2.0
2 stars 2 forks source link

Diagrams depends on all containing vocabularies #521

Open MichalMed opened 11 months ago

MichalMed commented 11 months ago

I'm not sure whether this is bug or feature.

Reproduction steps:

react-dom.production.min.js:216 TypeError: Cannot read properties of undefined (reading 'labels') at DiagramManagerSearch.tsx:61:44 at Array.map () at UB (DiagramManagerSearch.tsx:57:46) at sa (react-dom.production.min.js:157:137) at Za (react-dom.production.min.js:180:154) at Ks (react-dom.production.min.js:269:343) at Pu (react-dom.production.min.js:250:347) at Tu (react-dom.production.min.js:250:278) at Au (react-dom.production.min.js:250:138) at bu (react-dom.production.min.js:243:163) cs @ react-dom.production.min.js:216 react-dom.production.min.js:216 TypeError: Cannot read properties of undefined (reading 'color') at DiagramManagerListItem.tsx:55:49 at Array.map () at BB (DiagramManagerListItem.tsx:51:52) at sa (react-dom.production.min.js:157:137) at Ks (react-dom.production.min.js:267:460) at Pu (react-dom.production.min.js:250:347) at Tu (react-dom.production.min.js:250:278) at Au (react-dom.production.min.js:250:138) at bu (react-dom.production.min.js:243:163) at react-dom.production.min.js:123:115 cs @ react-dom.production.min.js:216 DiagramManagerSearch.tsx:61 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'labels') at DiagramManagerSearch.tsx:61:44 at Array.map () at UB (DiagramManagerSearch.tsx:57:46) at sa (react-dom.production.min.js:157:137) at Za (react-dom.production.min.js:180:154) at Ks (react-dom.production.min.js:269:343) at Pu (react-dom.production.min.js:250:347) at Tu (react-dom.production.min.js:250:278) at Au (react-dom.production.min.js:250:138) at bu (react-dom.production.min.js:243:163)

If I delete triple connecting the vocabulary to diagram (přílohový-kontext), then it works fine. I suggest this behaviour is OK as the mission control creates copies of each vocabulary, but with the canonical versions it does not work.

bindeali commented 10 months ago

I can't reproduce the bug on current main branch using slovník-test data - all that happens is the missing vocabulary is represented as a read-only vocabulary. If I delete the cache from the database, it just doesn't load, but there are no errors you describe. Can you send your testing data and commit version used, please?