Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-27 00:47:52

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Article tags cannot be used outside an article context on line 1887

Hi.

While in “Testing” mode, I have received the following message in an individual-article context:

tag_error <txp:title/> -> Textpattern Notice: Article tags cannot be used outside an article context on line 1887

This is the snippet I’m currently using (and the one that triggered the message):

<title><txp:if_individual_article><txp:section title="1" />: <txp:title /> | <txp:sitename />: <txp:site_slogan /></txp:if_individual_article><txp:if_article_list><txp:if_section name=""><txp:sitename />: <txp:site_slogan /><txp:else /><txp:section title="1" /> | <txp:sitename />: <txp:site_slogan /></txp:if_section></txp:if_article_list></title>

AFAIK, <txp:title /> (and any other article tag) can be used in individual article context since 4.0.x (can’t remember exactly since which version).

I’m also noticing this isn’t just a message in “Testing” mode, but also the fact that the <txp:title /> isn’t being outputted in the <title> (that is, in the the source) of the viewed page.
It’s not being parsed/rendered (don’t know the exact word).

I’m using TxP 4.0.5 and MLP.

Tag trace:

<!-- Runtime:    0.0637 -->
<!-- Query time: 0.016542 -->
<!-- Queries: 20 -->
<!-- Memory: 3697Kb, <txp:excerpt /> -->
<!-- txp tag trace: 
[SQL (0.000330): select name from txp_lang where lang='en-us' limit 1]
[SQL (0.007973): select name, data from txp_lang where lang='en-us' AND ( event='public' OR event='common')]
[SQL (0.001774): select name, code, version from txp_plugin where status = 1]
[SQL (0.000706): select ID,Section from l10n_txp_en_us where url_title like 'translation-services' AND Section='services' and Status >= 4 limit 1]
[SQL (0.000256): select *,`l10n_title_en_us` as `title` from txp_section where name = 'services' limit 1]
[SQL (0.000336): select *, unix_timestamp(Posted) as uPosted from l10n_txp_en_us where ID=12 and Status = 4]
[SQL (0.000232): select user_html from txp_page where name='services']
[Page: services]
<txp:l10n_get_lang type="long" />
<txp:l10n_get_lang/>
<txp:if_individual_article>
	[<txp:if_individual_article>: true]
	<txp:section title="1" />
		[SQL (0.000227): select `l10n_title_en_us` as `title` from txp_section where name='services']
	<txp:title/>
	<txp:sitename/>
	<txp:site_slogan/>
</txp:if_individual_article>
<txp:if_article_list>
	[<txp:if_article_list>: false]
</txp:if_article_list>
<txp:css/>
<txp:css n="ie" />
<txp:l10n_get_lang_dir/>
<txp:section/>
<txp:text item="go_nav" />
<txp:text item="go_search" />
<txp:text item="go_content" />
<txp:l10n_lang_list current_class="active" language_class="short" link_current=1 />
	[SQL (0.000238): select l10n_group from textpattern where `ID`='12']
	[SQL (0.000820): select *,ID as thisid, unix_timestamp(Posted) as posted from textpattern where `l10n_group`='12' and `Status` >= '4' and `l10n_lang`<>'nothing']
<txp:if_section name="services">
	[<txp:if_section name="services">: true]
</txp:if_section>
<txp:section link="1" title="1" name="services" />
<txp:if_section name="contact">
	[<txp:if_section name="contact">: false]
</txp:if_section>
<txp:section link="1" title="1" name="contact" />
	[SQL (0.000219): select `l10n_title_en_us` as `title` from txp_section where name='contact']
<txp:if_section name="articles">
	[<txp:if_section name="articles">: false]
</txp:if_section>
<txp:section link="1" title="1" name="articles" />
	[SQL (0.000203): select `l10n_title_en_us` as `title` from txp_section where name='articles']
<txp:article status="sticky" form="default" sortby="Posted" sortdir="asc" limit="1" />
	[SQL (0.000414): select *, unix_timestamp(Posted) as uPosted from l10n_txp_en_us where ID = 12 and Status = 5 limit 1]
	[article 12]
	[SQL (0.000196): select Form from txp_form where name='default']
	[Form: default]
	<txp:permlink>
		<txp:title/>
	</txp:permlink>
	<txp:posted/>
	<txp:body/>
	<txp:author/>
		[SQL (0.000215): select RealName from txp_users where `name` = 'jlander' limit 1]
	<txp:comments_invite wraptag="p" />
	<txp:site_url/>
<txp:article_custom status="sticky" form="title_excerpt" sortby="Posted" sortdir="asc" />
	[SQL (0.000745): select *, unix_timestamp(Posted) as uPosted from l10n_txp_en_us where 1 and Status = 5 and Posted <= now() order by Posted asc limit 0, 10]
	[article 12]
	[SQL (0.000195): select Form from txp_form where name='title_excerpt']
	[Form: title_excerpt]
	<txp:title/>
	<txp:excerpt/>
	[article 13]
	[Form: title_excerpt]
	<txp:title/>
	<txp:excerpt/>
	[article 14]
	[Form: title_excerpt]
	<txp:title/>
	<txp:excerpt/>
	[article 15]
	[Form: title_excerpt]
	<txp:title/>
	<txp:excerpt/>
[ ~~~ secondpass ~~~ ]
 -->

And some cryptic output in “Debugging” mode:

textpattern/lib/txplib_misc.php:1887 trigger_error()
textpattern/publish/taghandlers.php:1821 assert_article()
textpattern/publish.php:963 title()
processtags()
textpattern/publish.php:922 preg_replace_callback()
textpattern/publish/taghandlers.php:2308 parse()
textpattern/publish.php:963 if_individual_article()
processtags()
textpattern/publish.php:922 preg_replace_callback()
textpattern/publish.php:456 parse()

Thanks in advance.

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#2 2007-08-27 03:35:23

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Article tags cannot be used outside an article context on line 1887

Is the tag being correctly rendered in the rest of the page? What happens if you disable MLP?

Offline

#3 2007-08-27 04:05:16

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Article tags cannot be used outside an article context on line 1887

The tag is being correctly rendered only when it’s “called” by txp:article.
If it’s dropped in a page template (wrapped or not by txp:individual_article), there is no output at all.

When MLP is disabled (both the l10n plug-in and gbp_admin_library), nothing seems to change.

The weird thing is that the same snippet works fine in another 4.0.5 site.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#4 2007-08-29 14:58:11

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Article tags cannot be used outside an article context on line 1887

A little bump:

I post the hight diagnostics to see if that helps.

Textpattern version: 4.0.5 (r2466)
Last Update: 2007-08-13 21:07:02/2007-08-13 21:00:36
Document root: /home/mgo/html
$path_to_site: /home/mgo/html
Textpattern path: /home/mgo/html/textpattern
Permanent link mode: section_title
Temporary directory path: /tmp
Site URL: [removed by me]
PHP version: 4.3.11
GD Image Library: version bundled (2.0.28 compatible), supported formats: GIF, JPG, PNG
Server Local Time: 2007-08-29 11:10:42
MySQL: 4.0.18-standard-log
Locale: en_US.UTF-8
Server: Apache
Apache version: Apache
PHP Server API: apache2handler
RFC 2616 headers: 
Server OS: Linux 2.4.22-1.2199.8.legacy.nptlsmp
Active plugins: gbp_admin_library-0.4.581, l10n-0.6.600, zem_contact_lang-mlp-4.0.3-MLP, upm_image-0.6, upm_insert_tab-0.2.2, Postmaster_library-0.1, Postmaster-0.3, zem_contact_reborn-4.0.3.19, upm_img_popper-1.3.5

Pre-flight check: 
------------------------
Some Textpattern files are out of date: 
	/lib/txplib_db.php
Some Textpattern files have been modified: 
	/include/txp_category.php, 
	/include/txp_plugin.php, 
	/include/txp_auth.php, 
	/include/txp_form.php, 
	/include/txp_section.php, 
	/include/txp_tag.php, 
	/include/txp_list.php, 
	/include/txp_page.php, 
	/include/txp_discuss.php, 
	/include/txp_prefs.php, 
	/include/txp_log.php, 
	/include/txp_preview.php, 
	/include/txp_image.php, 
	/include/txp_article.php, 
	/include/txp_css.php, 
	/include/txp_admin.php, 
	/include/txp_link.php, 
	/include/txp_diag.php, 
	/include/txp_file.php, 
	/include/txp_import.php, 
	/lib/admin_config.php, 
	/lib/txplib_misc.php, 
	/lib/taglib.php, 
	/lib/txplib_head.php, 
	/lib/classTextile.php, 
	/lib/txplib_html.php, 
	/lib/IXRClass.php, 
	/lib/txplib_forms.php, 
	/lib/class.thumb.php, 
	/lib/constants.php, 
	/lib/txplib_update.php, 
	/lib/txplib_wrapper.php, 
	/publish/taghandlers.php, 
	/publish/atom.php, 
	/publish/log.php, 
	/publish/comment.php, 
	/publish/search.php, 
	/publish/rss.php, 
	/publish.php, 
	/index.php, 
	/css.php
clean_url_data_failed: 
------------------------

.htaccess file contents: 
------------------------
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/

	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

	RewriteRule ^(.*) index.php
</IfModule>

#php_value register_globals 0
------------------------

Some clarification abou this:

Some Textpattern files are out of date: 
	/lib/txplib_db.php
Some Textpattern files have been modified: 
...

The txplib_db.php file is slightly modified. I mean, I’m using the one provided by MLP and applied that change, because Ruud said that’s the only change.
And I dont think that change is related to the my problem, but I’m not the experte here ;)

The other files are reported as modified, but the truth is that they aren’t modified at all. I have seen this in more than one TxP installation (in different servers/hostings).
So, I think, that can be ignored too.

Last edited by maniqui (2007-08-29 14:58:58)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2007-09-06 04:39:44

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Article tags cannot be used outside an article context on line 1887

A new bump with more info:

this only seems to happen with sticky articles.

That is, when you are viewing an sticky article on its permlink page, article tags that are directly on the page template aren’t rendered.

I think I have reported this some time ago, but I’m not sure…


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#6 2007-09-13 01:32:12

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Article tags cannot be used outside an article context on line 1887

Ah yes, a fixed bug.

Offline

#7 2007-09-13 06:50:48

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

Re: Article tags cannot be used outside an article context on line 1887

To be more precise, a fixed fixed bug
This should work again in 4.0.6

Offline

#8 2007-10-27 10:53:17

dobidolots
New Member
Registered: 2006-06-21
Posts: 4

Re: Article tags cannot be used outside an article context on line 1887

Diagnostics tab continues to display:

‘Some Textpattern files have been modified: /lib/class.thumb.php’

What is this and should it (how?) be corrected?

Offline

#9 2007-10-27 11:22:23

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

Re: Article tags cannot be used outside an article context on line 1887

Diagnostics also shows which revision if that file and TXP you’re using. Checksums aren’t updated for each SVN version. If you know that you’ve modified/replaced class.thumb.php and that causes no other problems, then you can ignore the warning.

Offline

#10 2007-10-27 15:20:16

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Article tags cannot be used outside an article context on line 1887

dobidolots wrote:

Diagnostics tab continues to display:

‘Some Textpattern files have been modified:
/lib/class.thumb.php’

What is this and should it (how?) be corrected?

In which way is this related to the thread’s topic?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB