Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-10-10 18:36:20

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Permlink tag error message, even if all is working

I’ve got a little problem that I can’t understand. In a page template I use this:

<txp:article />

<txp:article_custom section="other-section" category="category" keywords='<txp:keywords />' break="li">

<h3><txp:permlink><txp:title/></txp:permlink></h3>
<txp:excerpt/>

</txp:article_custom>

The first article tag is for normal article, and the article custom for related article form another section, filtered by cat and keywords.

When in debug/test mode in the front site it actually works, but I also got this error:

Errore tag:  <txp:permlink> ->  Warning: Invalid argument supplied for foreach()  on line 727

The message is over when I’m in live mode, but I can’t understand how can I get rid of the error, and why it’s happening. What’s wrong?

Last edited by Zanza (2009-10-10 18:36:41)

Offline

#2 2009-10-10 18:57:15

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Permlink tag error message, even if all is working

Could it be caused by the use of keywords='<txp:keywords />'?. Are you trying to pull the keywords from the article that is called with the first <txp:article /> tag? In that case I think the article_custom tag should be either in your article form (used by the first article tag), or wrapped in if_individual_article tags.

Offline

#3 2009-10-10 23:19:49

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: Permlink tag error message, even if all is working

Unfortunately not. It’ already in an individual article context. I tried both cutting the keyword part and wrapping in an article tag. Same message. What wrong argument could it be?… mumbling…

Offline

#4 2009-10-11 08:50:00

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: Permlink tag error message, even if all is working

I received a notify about another Els message but, after the thread has been moved, I can’t find it. Is it a side-effect of this movement or has Els removed his message? (eventually, Els actually did move the thread and that was the origin of the message…)

Last edited by Zanza (2009-10-11 08:51:04)

Offline

#5 2009-10-11 16:36:15

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Permlink tag error message, even if all is working

Do you get more information if your website is in debug mode?
Which TXP version do you use?

Offline

#6 2009-10-11 17:49:25

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: Permlink tag error message, even if all is working

I use 4.2.0 and in debug mode I get this for each single error (depending on the number of article filtered by article_custom):

Errore tag:  <txp:permlink/> ->  Notice: Undefined index:  components  on line 727
PermanentLinks->_permlinkurl()
textpattern/publish/taghandlers.php:2784 call_user_func()
textpattern/publish/taghandlers.php:2742 permlinkurl()
textpattern/publish.php:1106 permlink()
textpattern/publish.php:1028 processTags()
textpattern/publish.php:786 parse()
textpattern/publish.php:903 doArticles()
textpattern/publish.php:893 parseArticles()
textpattern/publish.php:1106 article_custom()
textpattern/publish.php:1041 processTags()

Update: this happens even with related_articles instead of article_custom. In that case the penultimate row is referring to related_article().

If you need some other information in the html code, please let me know what to report. Anything under tagtrace?

Offline

#7 2009-10-11 19:56:30

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Permlink tag error message, even if all is working

Zanza wrote:

or has Els removed his message?

Her ;) Sorry about that, I accidentally hit ‘submit’ instead of ‘preview’ but it wasn’t correct so I deleted my post. I meant to re-post but got distracted and forgot about it…

Actually I was wondering if it could be related to this thread where johnstephens is reporting a problem with <txp:keywords /> in article list mode.
But since you said you also tried removing the keyword part, I don’t think it is.

Edit: I tried your exact code on my test site, and when I wrap it in if_individual_article tags, it works without any errors, when I don’t the only error I get is about the keywords tag: ‘Article tags cannot be used outside an article context’ (as expected). So I can’t reproduce your error at all.
What does the actual tag trace say?

Last edited by els (2009-10-11 20:27:42)

Offline

#8 2009-10-11 20:36:59

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Permlink tag error message, even if all is working

Diagnostics would be nice, especially a list of plugins installed. I suspect it’s a plugin that causes this, more specifically: one that offers a custom URL handler.

Offline

#9 2009-10-11 21:36:45

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: Permlink tag error message, even if all is working

or has Els removed his message?

Her ;)

Ops! Sorry, madame! :)
Actually it isn’t related to keywords.

@Ruud: Yes, it seems to be related to gbp_permanent_links (0.14.5). There was also another problem (related_articles not wrapped in article tag, where article tag should has been sticky).

To post tag trace I have to epurate the actual site url inside, before. I’ll investigate further and eventually post tag trace here, thanks.

Offline

#10 2009-10-12 20:39:38

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: Permlink tag error message, even if all is working

Just for the note, I’ve solved the issue by avoiding the use of gbp_permanent_links for that section. At the end it was unneeded, as I found a more elegant solution for using the same url scheme and menu generation. Thanks for your help.

Offline

Board footer

Powered by FluxBB