Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-05-16 06:28:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,799
Website

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.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#2 2018-05-16 07:21:19

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,061
Website

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

#3 2018-05-16 08:07:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,799
Website

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="">
&nbsp;
<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.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#4 2018-05-16 08:36:29

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,061
Website

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

#5 2018-05-16 08:43:26

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,526
Website

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.

Offline

#6 2018-05-16 08:53:10

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,799
Website

Re: txp4.7 custom fields are not working as expected

Hi Julian and thanks so much for your help

The figures are just not parsed in 4.7 for some reason.

Re the differences between the two sites

  1. I have not fully updated the css in the dev site
  2. I have <meta name="Robots" content="noindex,nofollow" /> in the dev site
  3. The content of the dev site is not fully updated to reflect the main site
  4. I have the latest rvm_css and etc_eastereggs plugins installed in the dev site.

Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#7 2018-05-16 09:13:15

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,799
Website

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.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#8 2018-05-16 09:18:19

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,526
Website

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).

Offline

#9 2018-05-16 09:32:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,799
Website

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.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#10 2018-05-16 09:51:41

etc
Developer
Registered: 2010-11-11
Posts: 2,832
Website

Re: txp4.7 custom fields are not working as expected

colak wrote #311806:

> Edited to add that on article lists the article tag seems to be performing as expected as a container tag.

Hell, my bad, sorry! You can temporary set form="", but I fear we are much closer to 4.7.1 than expected.


etc_[ query | search | pagination | date | tree | cache ]

Offline

Board footer

Powered by FluxBB