Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-11-30 02:52:08

azw
Member
Registered: 2007-01-29
Posts: 279

update to 4.0.7 problem with Tag error: <txp:else />

UPDATE: see second message.

When I first updated, I got the same preflight messages as december76 in “Trouble with 4.0.7 during pre-flight check” here:
http://forum.textpattern.com/viewtopic.php?id=29034

I uploaded another time in binary with CoreFTP and those problems disappeared.

Now I’m getting these errors related to <txp:else />. I saw this some months ago, too. As I recall, I would have edited a template (article or form) in TXP, and sometimes this <txp:else /> error would appear. I’d have to retype the a few lines that had else tags to get it to work.

What could be causing this?

This time, I’ve not edited any templates, I just updated TXP. The error does not seem to occur in articles that don’t invoke an else tag.

This is what the error messages look like. There are a number of them:

Tag error: <txp:else /> -> Textpattern Warning: tag does not exist on line 1104
textpattern/publish.php:1104 trigger_error()
textpattern/publish.php:1012 processTags()
textpattern/lib/txplib_misc.php:1548 parse()
textpattern/publish.php:770 parse_form()
textpattern/publish.php:887 doArticles()
textpattern/publish.php:550 parseArticles()
textpattern/publish.php:1090 article()
textpattern/publish.php:1012 processTags()
textpattern/publish/taghandlers.php:2574 parse()
textpattern/publish.php:1090 if_individual_article()

A similar issue was discussed earlier on the forum (posts #69 & #70:
http://forum.textpattern.com/viewtopic.php?pid=184999

Here’s my Diagnostic info:

Textpattern version: 4.0.7 (r3025)
Last Update: 2008-11-30 01:51:07/2008-11-30 02:17:39
Document root: /home/a29div/public_html
$path_to_site: /home/a29div/public_html
Textpattern path: /home/a29div/public_html/textpattern
Permanent link mode: section_title
upload_tmp_dir: /tmp
Temporary directory path: /home/a29div/public_html/textpattern/tmp
Site URL: www.29div.com
PHP version: 5.2.5
Register globals: 1
GD Image Library: version bundled (2.0.34 compatible), supported formats: GIF, JPG, PNG
Server Local Time: 2008-11-29 21:26:58
MySQL: 5.0.67-community
Locale: en_US.UTF-8
Server: Apache/1.3.39 (Unix) mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.30 OpenSSL/0.9.7a
PHP Server API: cgi
RFC 2616 headers: 0
Server OS: Linux 2.6.18-028stab059.6
Active plugins: altum Email Obfuscator-1.1.2m, asy_wondertag-0.5, chh_if_data-0.10, hcg_templates-0.3m, pap_contact_cleaner-0.1, rss_admin_db_manager-4.3, rss_admin_show_adv_opts-0.3, sac_link_in_excerpt-0.1.2, soo_toc-0.1.3, upm_datetime-0.5, wan_error_email-0.1m, zem_contact_reborn-4.0.3.20, zem_contact_lang-4.0.3.6, jmd_csv-0.2, glz_custom_fields-1.1.3

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

Options +FollowSymLinks
Options All -Indexes

<IfModule mod_rewrite.c> RewriteEngine On

  1. Prevent Hotlinking of pdfs & images RewriteCond %{HTTP_REFERER} . RewriteCond %{HTTP_REFERER} !^http://(www\.)?29div\.com [NC] RewriteRule \.(jpg|jpeg|png|gif)$ /images/1.gif [NC]

  1. Standard Textpattern URL rewrite #RewriteBase /relative/web/path/

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

RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php

RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]

</IfModule>

#php_value register_globals 0

————————————

And here is a snippet of the tag trace:

<txp:else />
Tag error: <txp:else /> -> Textpattern Warning: tag does not exist on line 1104
<txp:permlink>
<txp:title />
</txp:permlink>

Last edited by azw (2008-11-30 04:51:07)

Offline

#2 2008-11-30 04:55:31

azw
Member
Registered: 2007-01-29
Posts: 279

Re: update to 4.0.7 problem with Tag error: <txp:else />

Interesting…

I think the problem is two <txp:if_custom_field name=“xx”> tags nested in each other. I retyped the <txp:if_ and </txp:if_ tags, even added an <txp:else /> and now it works.

I wonder why I had to retype it?

For anyone who’s not heard that wonderful news about 4.0.7 having full nesting support and allowing unlimited nesting of identical tags, you’ll want to read this:
http://forum.textpattern.com/viewtopic.php?id=26942&p=1

Last edited by azw (2008-11-30 05:23:52)

Offline

#3 2008-11-30 14:12:10

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

Re: update to 4.0.7 problem with Tag error: <txp:else />

If re-typing works, then the original contained an error. The 4.0.7 tag parser is more strict than the 4.0.6 parser. The error was already there, but you probably didn’t notice until now.

Offline

#4 2008-11-30 18:50:45

azw
Member
Registered: 2007-01-29
Posts: 279

Re: update to 4.0.7 problem with Tag error: <txp:else />

Hi, Ruud, Thanks for replying.

I’ve seen the same thing in 4.0.6. Several times I had to retype code associated with a <txp:else />. I simply copied what was there. And the error messages always showed correctly spelled code.

I edit the code in the TXP editor in a browser. Could there be errors that can’t be seen (things like LRs or tabs)?

Offline

#5 2008-11-30 18:53:11

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

Re: update to 4.0.7 problem with Tag error: <txp:else />

Strange. The new parser is more strict about attributes, but more tolerant to the use of whitespace characters inside tags, so the upgrade from 4.0.6 to 4.0.7 should be related to that.

Offline

#6 2008-11-30 19:16:37

azw
Member
Registered: 2007-01-29
Posts: 279

Re: update to 4.0.7 problem with Tag error: <txp:else />

How can I view the white space to see what’s going on?

Offline

#7 2008-11-30 19:21:02

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

Re: update to 4.0.7 problem with Tag error: <txp:else />

The only accurate way I can think of is to export the database using PHPmyadmin before you fix the problem. Do the same thing after fixing the problem and then run a binary comparison or diff-tool on the export files

Offline

#8 2008-11-30 19:32:44

azw
Member
Registered: 2007-01-29
Posts: 279

Re: update to 4.0.7 problem with Tag error: <txp:else />

Okay.

And thanks for all you do, Ruud! The new update is an amazing advance for Textpattern!

Offline

#9 2008-12-04 13:56:09

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

Re: update to 4.0.7 problem with Tag error: <txp:else />

Note: I was about to show to the world how dumb I am :P

This is my post-about-to-be-posted until I found the error (and how dumb I am).

I’m (I was) also getting the message:

Tag error: <txp:else /> -> Textpattern Warning: tag does not exist on line 1104

The snippet is (was) this:

       <txp:if_section="">
        <txp:else />
        <txp:output_form form="nav" />
        </txp:if_section>

I’ve added the snippet after upgrading (in other words, the snippet wasn’t being used in 4.0.6).

Yeah, you may have already noticed it: <txp:if_section=""> <- WTF?

I think it’s a common typo (I’ve been there before). So, as ruud said above:

If re-typing works, then the original contained an error. The 4.0.7 tag parser is more strict than the 4.0.6 parser. The error was already there, but you probably didn’t notice until now.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#10 2008-12-04 17:34:55

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

Re: update to 4.0.7 problem with Tag error: <txp:else />

^^ btw. in this case the resulting HTML would’ve shown the <txp:section=""> part, because the parser doesn’t recognize it as a properly formatted TXP tag and simply skips it.

Offline

Board footer

Powered by FluxBB