Hey Ade
I’ll try to test this locally in the next few days, but I’m guessing the taxonomy field works with regular taxonomies only.
If you have any more info on your setup to help me recreate that would be most helpful.
Otherwise I’ll revert with any questions/feedback after giving it a spin – I assume recreating will be straight forward enough.
Thanks
-
This reply was modified 5 years ago by
Code Amp.
-
This reply was modified 5 years ago by
Code Amp.
-
This reply was modified 5 years ago by
Code Amp.
Thanks for the quick response.
What’s odd is that I also have the EventOn plugin installed, and this creates its own custom taxonomies – which work with Custom Layouts fine. Maybe it could be some sort of hierarchical issue, being caused by the way the Pods taxonomy is linked to the Pods post type?
More than happy to send over screenshots, database snapshots, etc. if it helps.
Thanks again
Hey @adeparker just to let you know I plan on diving into this tomorrow.
Best
– Ross
-
This reply was modified 5 years ago by
Code Amp.
Hey @adeparker
So I managed to take a look at this. Odd thing is, on my first go it seems to work – typical! :/
I’m wondering, perhaps a setting in the taxonomy field is throwing this off.
I would check all the settings and make sure they have sensible defaults.
Based on the error message I would check:
1) Labels -> Label + Singular Label are both filled
2) Advanced -> Public is ticked
Here are my test setting that worked:
https://drive.google.com/file/d/1o3w2Ja-St2Gbfv4Z6Q0118RTHwxuhP0g/view?usp=sharing
Happy to take a look at your setup to see if I can spot anything?
Best
Hey there,
Thanks for the reply. I’ve double checked the labels and the Public setting, both are set as you have suggested. Also, the options I have match the GIF you’ve sent over with only one minor difference. I have a Pods custom post type, which the custom Pod taxonomy is linked to. That being said, I’ve just created a new custom taxonomy and linked it to both nothing, and standard posts, and that does the same thing.
The setup I have is a Directory post type, which has a number of hierarchical taxonomies (Type of Business, Styles Sold, Shipping Locations, etc.) which are all created in Pods.
Screenshots of my setup:
https://drive.google.com/drive/folders/1_NjxnLuIbvyITyCFoEGZDFOt1Gt3bZzG?usp=sharing
Feel free to see if anything obvious jumps out.
Kind regards
I probably should add that I can pick fields from the parent post type (e.g. address, phone number) quite happily, and display these on the Template
I’ve added a screenshot of a breakpoint on the line of code which errors, to the Google Drive link. Maybe that may help
-
This reply was modified 5 years ago by
adeparker.
Apologises, keep finding other bits out.
I’ve added a breakpoint to line 12460 of custom-layouts.js:
return t.label.toLocaleLowerCase() === e.toLocaleLowerCase()
When I run through, it loops a number of times fine and the line equates to false. On one loop, that line equates to <not available>. In all cases before, t.label has a value. On this one, t.label: false. The value: “post_status”
If I run through on one of the other taxonomies, they all equate as false (screenshots added to Google Drive)
If I manually edit the t.label in Chrome console, Sources –> Scope, the code then runs through and completes ok. I can then select the taxonomy and save the template
-
This reply was modified 5 years ago by
adeparker.
-
This reply was modified 5 years ago by
adeparker.
-
This reply was modified 5 years ago by
adeparker.
Hey @adeparker
Thanks for all the detailed info!
So yeah I can see the issue from your great debugging.
As we cycle through your available taxonomies, we reach a taxonomy called post_status and its label is defined as false…
All your other taxonomies have a label, so don’t fail at this step just this one.
I’ve just added a “fix” to our plugin (so at least it doesn’t throw an error), so that if a taxonomy doesn’t have a label, it doesn’t get shown.
You can test this yourself by changing the offending line:
return t.label.toLocaleLowerCase() === e.toLocaleLowerCase()
to:
return t.label && t.label.toLocaleLowerCase() === e.toLocaleLowerCase()
However, I think the real question is, what is this taxonomy? Strange it is called post_status…
Anyway let me know how you get on with this workaround for now, and lets see if we can identify the root of this issue.
Thanks
-
This reply was modified 5 years ago by
Code Amp.
-
This reply was modified 5 years ago by
Code Amp.
Yup, I can confirm that that change does resolve it. Works perfectly now.
There is a post_status taxonomy in my WordPress installation (I can see it in the Pods Admin, but it wasn’t created by Pods) Looking at the term_taxonomy DB table, I can see a number of post_status items with items such as “New idea proposed”, “An author has been assigned to the post”. I use the Oasis Workflow plugin, which I’ve just discovered has those custom statuses in. There are three fields with that taxonomy in term_taxonomy table, all three have a description though. Which field does the label look at?
Thanks for all the help
-
This reply was modified 5 years ago by
adeparker.
Hey @adeparker
Just to let you know we’ve just pushed a release with this fix in.
RE where does it look, our plugin just asks WP for the label (using a WP function) – I assume that is in one of columns of the taxonomy tables.
I’ll close this for now then.
Best
– Ross
-
This reply was modified 5 years ago by
Code Amp.
Thank you.
Awesome support. Just updated the plugin. Can confirm it works perfectly!
No problem Ade – glad this issue is sorted!
BTW, if you feel inclined (no worries if not), a review from you would be lovely
https://ww.wp.xz.cn/support/plugin/custom-layouts/reviews/
Best