Closed madc closed 1 month ago
On page_meta
it shows the following message:
Hi Matt thanks for opening this issue.
pages_meta
but received null
. In the background I do validation of fields to ensure the schema is correct before any further processing. This error indicates that layout options are probably missing the collection name to be set, but your other screen shows, that it actually is being set.Q: Could you click on Related Collection
dropdown in Layout Options and ensure, there is a collection called Pages Meta?
Q: What DB have you used for this test?
Rel Parent
has not been configured properly.Q1: Could you please edit this collection, open the configuration of rel parent and take a screenshot of Relationship
tab?
Q2: After that, could you potentially remove that field and recreate it manually with following settings?
Add O2M to "pages_meta"
rels_children
@guidomallee given the information you've shared here I start to think, this might be related to DB type. Could you confirm what DB are you using?
@pticon91 I'm on Directus Professional Cloud. Couldn't find so quickly which database Directus Cloud is using under the hood...
@guidomallee would you be able to create a new relationship in pages_meta
with key hello
for M2O and 'world' for O2M (as mentioned above) and share API response for /fields/pages_meta
and relations/pages_meta
? So I could see if theres any significant difference in payload.
Meanwhile I'll spinup at least PG DB.
I was able to replicate the issue with postgres
. Thank you both for the report I'll try to fix it as soon as possible.
Thanks! I assume my test won't be of any use then, correct?
Really looking forward to using your extension - precisely what we need! Thank you for all efforts :)
Thanks! I assume my test won't be of any use then, correct?
Really looking forward to using your extension - precisely what we need! Thank you for all efforts :)
Correct, but thanks. Also I hope this extension will be of any use for you! Cheers
I've just released v1.0.1
should be in marketplace in few hours. I'll close this issue once you confirm it works for you.
That was quick! I was able to get it to work with your new version, but there are still some issue.
My pages
collection was empty, when I went through the setup process. That results in this message:
When I create a new page, it the message persists and the new page is not shown. I can than switch to the traditional table layout and manually create a page_meta
record and then it works:
It would also be interesting, what the reason for the pages_meta
table are.
Well, now that's the thing that admin should ensure. This extension helps you to populate collection only when running for the first time, but when you create a new page you must create a new item in meta as well (manually or using Flows). So if you didn't do that, I recommend to mark the meta field as required and allow create
option only. I am unable to do that programatically. I tried to add a hook to the bundle but this hook didn't have an access to layout options, so it couldn't read what collection should be tracked and to which collection it should populate data automatically.
Or if this is not your case, elaborate more on what's happenning please.
It would also be interesting, what the reason for the
pages_meta
table are.
1. Less complex code: The first version of the extension has been creating columns directly into main collection and I even let admins to name the columns freely. However after sometime I've realised that this decision raised unnecessary complexity in the code and was generating "false" updates in the tracking collection as well.
2. Preventing false updates: If you decide to use updated_at
field from main collection on your frontend, this field will be reflecting updates to the content only. This is actually visible in my videos. I've chosen the updated_at
field in secondary label on purpose, to show that everytime when I save changes the original collection is not impacted.
3. Clearer seperation (of concerns?) + easier extendiblity: If you use this extension, your original collection is updated with connector field only and if uninstall the extension you will have to remove just meta collection and job is done. Another benefit is that the meta collection could be used for other fields like SEO. Even tough I do the validation of fields, I validate only fields required for composing the hierarchy and path, so I don't mind if admin injects another fields to that collection until they don't change the schema of existing fields (some tweaks like hiding or sorting fields are allowed).
I am closing this issue in favor of v1.0.1
Dcp Tree View: 1.0.0-rc.1 Directus: 10.13.1
Installed via Directus Marketplace on a Cloudron instance.
We just installed the bundle into a fresh installation, containing only a
pages
collection. We followed the instructions in the first video, but there seems to be an issue while or after creating the helper collection (pages_meta
). It does not auto-select the newly created collection and does not switch to the new layout. After reloading the page this message is show:The console (Firefox) shows the following message:
Settings:
Please let me know, what additional information or support I can provide to tackle this.