Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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: 11,269
Website GitHub

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: 11,269
Website GitHub

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: 11,269
Website GitHub

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

#21 2017-03-05 10:29:44

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

Re: txp:article_custom misbehaving?

YOU FOUND IT! Thank you!!! Now how do I fix it at the database level _


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

Offline

#22 2017-03-05 10:33:34

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

Re: txp:article_custom misbehaving?

It’s cuz Expires is set to 0000-00-00 00:00:00 rather than NULL

FIXED (I think!)

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


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

Offline

#23 2017-03-05 10:42:27

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: txp:article_custom misbehaving?

alicson wrote #304398:

YOU FOUND IT! Thank you!!! Now how do I fix it at the database level _

First, back up your database from phpMyAdmin or something :-)

Then, go take a look at the two most recent articles in journal:

select * from textpattern where Section='journal' order by posted desc limit 2

The first is the one we just mucked about with when resaving. The second isn’t. Compare them. Look at the dates, for example. Does the Expiry date look different? Is one 0000-00-00 and other NULL, for example?

If they’re different you can run an SQL statement to update them all en-masse:

UPDATE textpattern SET Expires = NULL where Expires = '0000-00-00 00:00:00'

(EDIT: aha, just read your update: looks like that’ll sort you out, yay).

If the expiry dates are the same it might be a weird Textile thing that I’ve encountered before. I haven’t found a satisfactory way around that yet. There’s a plugin by sed somewhere which does a ‘resave all articles’ but I’ve never had much luck running it. Sometimes it works, other times it doesn’t, but it’s worth a shot. I’ll try and dig out the post for you.

If you don’t have many articles, you could just open each one and hit Save. That’s the low-tech method, but the most time consuming.

Last edited by Bloke (2017-03-05 10:44:04)


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

#24 2017-03-05 10:45:24

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

Re: txp:article_custom misbehaving?

You are ALL the very good things. THANK YOU again! Now I can proceed with identifying broken plugins and trying to live without some of them. Yay to having the basic tags functioning properly!!


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

Offline

Board footer

Powered by FluxBB