Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
txp4.7 custom fields are not working as expected
I have installed the latest stable and this time something did break.
In individual articles, the custom fields (which load the images, etc) as well as the sidebar are not parsed.
The code used can be found on github.
Compare the dev site using 4.7 stable on dev.colakides.com/events/itpes with the main site still on 4.6.2 on www.neme.org/events/itpes. The dev site is in debug mode which might be of help.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: txp4.7 custom fields are not working as expected
Could it be a section assignment thing that’s not quite right with the new themes setup? It looks to me like the source on dev.colakides.com has a different structure to that on neme.org. On neme.org you have .grid_18
and .grid_6
classes but on the dev site there’s none of that. That would suggest it’s processing another form structure, hence no images and no sidebar?
TXP Builders – finely-crafted code, design and txp
Offline
Re: txp4.7 custom fields are not working as expected
The classes are there:
Here is the code for the images which are supposed to appear on the top from the dev site:
<txp:if_article_section name="events,participations">
<txp:article>
<figure itemscope itemtype="http://schema.org/ImageObject" class="grid_6 nosmall">
<txp:images limit="1" sort="rand()" id='<txp:custom_field name="img2" />' break="">
<txp:thumbnail class="ds" />
</txp:images>
</figure>
<figure itemscope itemtype="http://schema.org/ImageObject" class="grid_18">
<txp:variable name="aimg" value='<txp:custom_field name="img_main" />' />
<txp:if_variable name="aimg" value="">
<txp:else />
<txp:images id='<txp:variable name="aimg" />' sort="rand()" limit="6" wraptag="ul" break="li" class="rslides">
<txp:image />
</txp:images>
</txp:if_variable>
</figure>
...
</txp:article>
</txp:if_article_section>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: txp4.7 custom fields are not working as expected
colak wrote #311799:
The classes are there:
I know they’re in your code but when I look at the source of the page you linked on dev.colakides.com, the source code is not the same as on neme.org. Only the container .container_24
class is there. The code inside that which displays the article is quite different, which suggests to me it’s not even using your template. Here’s a screenshot of the inspector view of the two:
My point is it may not be the custom fields at all but something in the theme / page / form being used.
TXP Builders – finely-crafted code, design and txp
Offline
Re: txp4.7 custom fields are not working as expected
I was going to show the same screenshots as Jacob did :-)
One suggestion: add lots of comments in your templates / forms to make sure it is fetching the ‘correct’ items.
Here is a screenshot of the relevant part of the tag trace – I don’t see any hints that the code you posted above is being called.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: txp4.7 custom fields are not working as expected
Hi Julian and thanks so much for your help
The figure
s are just not parsed in 4.7 for some reason.
Re the differences between the two sites
- I have not fully updated the css in the dev site
- I have
<meta name="Robots" content="noindex,nofollow" />
in the dev site - The content of the dev site is not fully updated to reflect the main site
- I have the latest rvm_css and etc_eastereggs plugins installed in the dev site.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: txp4.7 custom fields are not working as expected
Hi Philippe
Thanks for reinforcing what I was looking at. I guess the main difference is in the functionality.
On the “live” site, the article
tag is not looking for a form and parses the content inside it, on the “dev” site, the article
tag uses the default
form. I created a form where I added the code I previously enclosed in the article
tag, changed the article tag to <txp:article form="ep" />
and all came back.
I guess that Julian was right first time, the problem is not with the custom_fields
but with the article
tag as it is not working as expected as a container tag…
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: txp4.7 custom fields are not working as expected
txp:article
works fine for me as a container tag, but I probably use it differently than you.
Hmm, have you considered that etc_eastereggs
might still be buggy? (I haven’t used it, so I have no idea at all how well it performs).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: txp4.7 custom fields are not working as expected
phiw13 wrote #311805:
txp:article
works fine for me as a container tag, but I probably use it differently than you.Hmm, have you considered that
etc_eastereggs
might still be buggy? (I haven’t used it, so I have no idea at all how well it performs).
I have disabled the plugin and re-instated the code but the problem was still there. With the plugin on and the self enclosed tag all came back again.
> Edited to add that on article lists the article
tag seems to be performing as expected as a container tag.
Last edited by colak (2018-05-16 09:35:25)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
Re: txp4.7 custom fields are not working as expected
etc wrote #311809:
Hell, my bad, sorry! You can temporary set
form=""
, but I fear we are much closer to 4.7.1 than expected.
Hi Oleg,
That actually solved it!
I’m not sure if the bug was there in the betas but I don’t remember seeing it.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: txp4.7 custom fields are not working as expected
colak wrote #311810:
I’m not sure if the bug was there in the betas but I don’t remember seeing it.
Hi Yiannis,
it must be quite recent, probably rc. And undetectable in the default theme… I apologize. Well, it contributes to the fast release cycle.
Offline