Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2017-03-05 08:36:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,726
Website

Re: txp:article_custom misbehaving?

Hey you. Great to see you back.

This is very odd. Couple of things:

  • Does debugging mode give any clues? Post any relevant parts of the tag trace here if you’re unsure.
  • Check your entire Page and its Forms for any unclosed tags or double-closed tags, e.g. </txp:else />. The parser in 4.6.2 is a lot stricter than in older versions of Txp and won’t necessarily give you much help in telling you (the parser in the next version will be much more helpful, btw).

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#12 2017-03-05 08:46:04

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: txp:article_custom misbehaving?

::hug:::::: I’m hoping to be (on my way) back; I’ve really missed textpeoples.

Heh. I’ll turn debugging mode back on, however it’s reallllly scary. Lots of old plugins.. I’m slowly paring them down, however the site really heavily relies on them.
The Where_used plugin is so much goodness.

Scouring for unclosed/double-closed tags…


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#13 2017-03-05 09:11:14

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: txp:article_custom misbehaving?

It’s unhappy with my custom fields too (the field names are correct.. cite_author, cite_title, nodate)..

Tag error: <txp:if_custom_field name="cite_author"> ->  Textpattern Notice: field_not_found: cite_author while parsing form None on page sandbox
textpattern/publish/taghandlers.php:4416 trigger_error()
if_custom_field()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:514 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:463 processTags()
textpattern/publish/taghandlers.php:3824 parse()
if_article_list()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:514 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:463 processTags()
Tag error: <txp:if_custom_field name="cite_title"> ->  Textpattern Notice: field_not_found: cite_title while parsing form None on page sandbox
textpattern/publish/taghandlers.php:4416 trigger_error()
if_custom_field()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:514 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:463 processTags()
textpattern/publish/taghandlers.php:3824 parse()
if_article_list()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:514 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:463 processTags()
Tag error: <txp:if_custom_field name="cite_author"> ->  Textpattern Notice: field_not_found: cite_author while parsing form None on page sandbox
textpattern/publish/taghandlers.php:4416 trigger_error()
if_custom_field()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:514 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:463 processTags()
textpattern/publish/taghandlers.php:3824 parse()
if_article_list()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:514 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:463 processTags()
Tag error: <txp:if_custom_field name="nodate"> ->  Textpattern Notice: field_not_found: nodate while parsing form None on page sandbox
textpattern/publish/taghandlers.php:4416 trigger_error()
if_custom_field()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:514 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:463 processTags()
textpattern/publish/taghandlers.php:3824 parse()
if_article_list()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:514 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:463 processTags()

textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#14 2017-03-05 09:32:15

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: txp:article_custom misbehaving?

Also (on the pre-flight check)…

Clean URL data test failed: <pre dir="auto">A problem occurred while loading the plugin: <b>gbp_permanent_links</b> -> <b>Notice: unserialize(): Error at offset 0 of 108 bytes on line 194</b></pre> 

Version 0.14.7 installed of gbp_permanent_links; I don’t think that’s related to the txp:article_custom issue either though(?)..

I’m boggled by the txp:article_custom and the txp:if_custom_field tags. I think I’m using them correctly(?) they’re just not doing what I think they’re supposed to, and I don’t know what is interfering.

Last edited by alicson (2017-03-05 09:34:23)


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#15 2017-03-05 09:34:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,726
Website

Re: txp:article_custom misbehaving?

Eeek, lots of issues there. Most are gbp_permanent_links though. The name of the permlink pref has changed, which isn’t helping. It’s permlink_format not permalink_title_format now. But anyway…

There’s no tag trace showing up when viewing source, unfortunately. Although your sandbox page is badly formed (two open body tags, two closing html tags) there’s no tag trace on the 404 page either, so it’s not that. I suspect the parser is choking on something.

How about we go right back to basics: make a new Page in a new temporary Section and just make it real simple:

<html>
<head>
<title>Ferrydust testing</title>
</head>
<body>
<h1>Test article custom</h1>
<txp:article_custom limit="1" section="journal">
<txp:title />
<txp:body />
<txp:if_custom_field name="cite_author">
   <txp:custom_field name="cite_author">
</txp:if_custom_field>
</txp:article_custom>
</body>
</html>

If that works and you get a tag trace, we know it’s something to do with the Page/Form logic. You can then add the ‘form=”@journal”’ back in:

<body>
<h1>Test article custom</h1>
<txp:article_custom form="@journal" limit="1" section="journal" />
</body>

And put some random text output at various places in the ‘journal’ form to see if you can work out if it’s something in that Form that’s causing the problem. Then work outwards from there, building the page up block by block: copy in the title portion from your original Page, then header, footer, etc, and test each part until it resembles your regular Page layout. Hopefully at one stage it’ll break and you can then dive in to that specific part to find out what’s going on.

Last edited by Bloke (2017-03-05 09:35:22)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#16 2017-03-05 09:45:01

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: txp:article_custom misbehaving?

Updated the page

GRAPES
<txp:article_custom limit="1" section="journal">
GOOSEBERRIES
<txp:title />
<txp:body />
GOLDENAPPLES
</txp:article_custom>
GUAVA
<br /><br />
PLUMS
<txp:article_custom limit="1" section="sandbox">
PEARS
<txp:title />
<txp:body />
PEACHES
</txp:article_custom>
PERSIMMON
<br /><br />
APRICOTS
<txp:article_custom limit="2" section="sandbox" form="@title" />
APPLES
<br /><br />
BLUEBERRIES
<txp:article_custom id="2418" form="@title" /><!-- sandbox article -->
BANANAS
<br /><br />
CLEMENTINES
<txp:article_custom id="2392" form="@title" /><!-- journal article -->
CHERRIES

Last edited by alicson (2017-03-05 10:10:30)


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#17 2017-03-05 10:03:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,726
Website

Re: txp:article_custom misbehaving?

alicson wrote #304393:

Updated the page

Cool. Still no tag trace, though. Must be gbp_permanent_links doing something. Or another plugin. Can you disable gbp_pl and the gbp_admin_library just for a wee while? Then look at the source and see if a tag trace appears at the bottom? If not, shut off any public plugins one by one until the trace appears. Once we find what’s getting in the way we can move forward.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#18 2017-03-05 10:11:53

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: txp:article_custom misbehaving?

Disabled the two gbp plugins, and I think there’s a tag trace now! :)


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#19 2017-03-05 10:20:47

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: txp:article_custom misbehaving?

Turned off all the plugins. Error messages went away, however I’m still not sure about that article_custom …


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#20 2017-03-05 10:25:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,726
Website

Re: txp:article_custom misbehaving?

alicson wrote #304395:

Disabled the two gbp plugins, and I think there’s a tag trace now! :)

Okay, awesome. I think you have a content/null date issue here, which is potentially annoying.

To prove it, go find your most recent article in the journal section, open it up in the Write panel and just hit Save. Then visit your sandbox again. If the article shows up, I suspect something at the database level needs fixing :-(

Last edited by Bloke (2017-03-05 10:26:47)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB