Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
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
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
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
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