Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-25 21:10:50

Germaris
Member
From: Montreal, QC Canada
Registered: 2005-11-12
Posts: 44
Website

[resolved] What is this error?

Hi there!

Suddenly, in the “links” section, in place of articles dates I see now:

Parse error: syntax error, unexpected ‘%’ in /Library/WebServer/Documents/__Blog/textpattern/publish/taghandlers.php(3082) : eval()’d code on line 4

What does this mean?

I didn’t make any change to my articles or anywhere else.

Thanks in advance for the “medicine”!


If destiny is against us, just too bad for it!

Offline

#2 2009-06-25 21:17:02

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [resolved] What is this error?

Could you provide:

Offline

#3 2009-06-26 07:09:25

Germaris
Member
From: Montreal, QC Canada
Registered: 2005-11-12
Posts: 44
Website

Re: [resolved] What is this error?

<!-- txp tag trace: 
[SQL (0,0034189224243164): select name, data from txp_lang where lang='fr-fr' AND ( event='public' OR event='common')]
[SQL (0,00085306167602539): select name, code, version from txp_plugin where status = 1 AND type IN (0,1) order by load_order]
[SQL (0,00031805038452148): select page, css from txp_section where name = 'links' limit 1]
[SQL (0,00027298927307129): select host from txp_log where ip='127.0.0.1' limit 1]
[SQL (0,00024890899658203): insert into txp_log set `time`=now(),page='/index.php?s=links',ip='127.0.0.1',host='www.ohgeraaard.info',refer='',status='200',method='GET']
[SQL (0,00024604797363281): select user_html from txp_page where name='default']
[Page: default]
<txp:css n="oh_gerard" />
<txp:page_title />
	[SQL (0,00019192695617676): select title from txp_section where name='links']
<txp:output_form form="header" />
	[SQL (0,00018787384033203): select Form from txp_form where name='header']
	[Module: header]
	<txp:site_name />
	<txp:site_slogan />
	<txp:output_form form="top_nav" />
		[SQL (0,00021791458129883): select Form from txp_form where name='top_nav']
		[Module: top_nav]
		<txp:if_search>
			[<txp:if_search>: false]
			<txp:if_section name="">
				[<txp:if_section name="">: false]
				<txp:site_url />
			</txp:if_section>
		</txp:if_search>
		<txp:if_section name="about">
			[<txp:if_section name="about">: false]
			<txp:site_url />
		</txp:if_section>
		<txp:if_section name="links">
			[<txp:if_section name="links">: true]
			<txp:site_url />
		</txp:if_section>
		<txp:if_section name="archive,archivemonth">
			[<txp:if_section name="archive,archivemonth">: false]
			<txp:site_url />
		</txp:if_section>
		<txp:if_section name="contact">
			[<txp:if_section name="contact">: false]
			<txp:site_url />
		</txp:if_section>
		<txp:if_section name="gallery">
			[<txp:if_section name="gallery">: false]
			<txp:site_url />
		</txp:if_section>
<txp:output_form form="sidebar" />
	[SQL (0,00022506713867188): select Form from txp_form where name='sidebar']
	[Module: sidebar]
	<txp:search_input label="Entrer un mot ou plus..." button="Chercher" size="20" />
		[SQL (0,00016903877258301): select form from txp_form where `name` = 'search_input' limit 1]
	<txp:article_custom form="recently" limit="10" section="article" sortby="Posted" sortdir="desc" listform="recently" />
		[SQL (0,0021040439605713): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section IN ('article') order by Posted desc limit 0, 10]
		[article 71]
		[SQL (0,00022792816162109): select Form from txp_form where name='recently']
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
		[article 70]
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
		[article 69]
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
		[article 68]
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
		[article 64]
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
		[article 67]
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
		[article 66]
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
		[article 65]
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
		[article 63]
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
		[article 59]
		[Module: recently]
		<txp:permlink>
			<txp:title />
		</txp:permlink>
	<txp:linklist form="plainlinks" category="special" sort="linksort" />
		[SQL (0,00039815902709961): select *, unix_timestamp(date) as uDate from txp_link where category IN ('special') order by linksort ]
		[SQL (0,00018787384033203): select Form from txp_form where name='plainlinks']
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
	<txp:linklist form="plainlinks" category="favoris" sort="linksort" />
		[SQL (0,00040507316589355): select *, unix_timestamp(date) as uDate from txp_link where category IN ('favoris') order by linksort ]
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
	<txp:linklist form="plainlinks" category="information" sort="linksort" />
		[SQL (0,00043606758117676): select *, unix_timestamp(date) as uDate from txp_link where category IN ('information') order by linksort ]
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
		[Module: plainlinks]
		<txp:linkdesctitle />
	<txp:linklist form="plainlinks" category="presse" sort="linksort" />
		[SQL (0,00027084350585938): select *, unix_timestamp(date) as uDate from txp_link where category IN ('presse') order by linksort ]
	<txp:linklist form="plainlinks" category="television" sort="linksort" />
		[SQL (0,00024199485778809): select *, unix_timestamp(date) as uDate from txp_link where category IN ('television') order by linksort ]
	<txp:linklist form="plainlinks" category="culture" sort="linksort" />
		[SQL (0,00024914741516113): select *, unix_timestamp(date) as uDate from txp_link where category IN ('culture') order by linksort ]
	<txp:linklist form="plainlinks" category="politique" sort="linksort" />
		[SQL (0,00025105476379395): select *, unix_timestamp(date) as uDate from txp_link where category IN ('politique') order by linksort ]
<txp:if_search>
	[<txp:if_search>: false]
	<txp:if_section name="">
		[<txp:if_section name="">: false]
	</txp:if_section>
	<txp:if_section name="about">
		[<txp:if_section name="about">: false]
	</txp:if_section>
	<txp:if_section name="contact">
		[<txp:if_section name="contact">: false]
	</txp:if_section>
	<txp:if_section name="gallery">
		[<txp:if_section name="gallery">: false]
	</txp:if_section>
	<txp:if_section name="links">
		[<txp:if_section name="links">: true]
		<txp:article limit="20" />
			[SQL (0,00044107437133789): select count(*) from textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section IN ('links')]
			[SQL (0,00051712989807129): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section IN ('links') order by Posted desc limit 0, 20]
			[article 4]
			[SQL (0,00021100044250488): select Form from txp_form where name='default']
			[Module: default]
			<txp:permlink>
				<txp:title />
			</txp:permlink>
			<txp:if_section name="links">
				[<txp:if_section name="links">: true]
				<txp:php>
				</txp:php>
				<txp:site_url />
				<txp:section />
				<txp:category1 />
				<txp:category1 />
				<txp:site_url />
				<txp:section />
				<txp:category2 />
				<txp:category2 />
			</txp:if_section>
			<txp:if_article_list>
				[<txp:if_article_list>: true]
				<txp:if_excerpt>
					[<txp:if_excerpt>: true]
					<txp:excerpt />
					<txp:permlink>
					</txp:permlink>
				</txp:if_excerpt>
			</txp:if_article_list>
			<txp:if_comments_allowed>
				[<txp:if_comments_allowed>: false]
			</txp:if_comments_allowed>
		<txp:older>
		</txp:older>
		<txp:newer>
		</txp:newer>
	</txp:if_section>
</txp:if_search>
<txp:output_form form="footer" />
	[SQL (0,00023102760314941): select Form from txp_form where name='footer']
	[Module: footer]
[ ~~~ secondpass ~~~ ]

Thanks for replying!
Content match what expected except for the date of the article(s)
I used TextPattern Admin in French.
Diagnostic is “Toutes les vérifications sont OK !”
(which means “All verifications are OK”)

Regards,

Gerard

(added p. to escape the code block. -Els)

Last edited by els (2009-06-26 11:56:05)


If destiny is against us, just too bad for it!

Offline

#4 2009-06-26 09:08:24

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [resolved] What is this error?

What is inside those <txp:php> tags in your article form?

Germaris wrote:

Diagnostic is “Toutes les vérifications sont OK !”

No, no. The complete diagnostics info, that we could actually see your server specs, Textpattern version, installed plugins, modified files and so on. That is why I asked it.

Offline

#5 2009-06-26 09:52:55

Germaris
Member
From: Montreal, QC Canada
Registered: 2005-11-12
Posts: 44
Website

Re: [resolved] What is this error?

Here is the info you ask for.
For additional info, I’m experiencing this issue only in the “Links” section of my top navigation.
Otherwise, everything runs fine.
Even in this section, content and images dysplay is good.
Only the date of the article is the problem.

It’s the only issue I have on my blog.
You can see my blog at http://www.ohgeraaard.info

——————————————————————————
——————————————————————————
Here is the default article form I use:

<div class=“post”>
<h2 class=“posttitle”><txp:permlink><txp:title /></txp:permlink></h2>
<txp:if_section name=“links”>
<p class=“linksmeta”><txp:php>
global $locale;
setlocale(LC_ALL, ‘fr_FR’);
echo posted(array(‘format’ => ‘%d. %B %Y’));
setlocale(LC_ALL, $locale);
</txp:php> – <a href=”<txp:site_url />/index.php?s=<txp:section />&amp;c=<txp:category1 />”><txp:category1 /> </a> <a href=”<txp:site_url />/index.php?s=<txp:section />&amp;c=<txp:category2 />”> <txp:category2 /></a></p>
<txp:else />
<p class=“postmeta”><txp:posted /> – <a href=”<txp:site_url />/index.php?s=<txp:section />&amp;c=<txp:category1 />”><txp:category1 /> <a href=”<txp:site_url />/index.php?s=<txp:section />&amp;c=<txp:category2 />”> <txp:category2 /></a></a></p>
</txp:if_section>
<div class=“postentry”>
<txp:if_article_list>
<txp:if_excerpt>
<txp:excerpt />
<p class=“morelink”><txp:permlink>Article complet…
</txp:permlink></p>
<txp:else />
<txp:body />
</txp:if_excerpt>
<txp:else />
<txp:body />
<txp:article_image />
</txp:if_article_list>
</div>
<txp:if_comments_allowed>
<p class=“postfeedback”><txp:comments_invite /></p>
</txp:if_comments_allowed>
</div>

(Diagnostics part deleted)

Last edited by Germaris (2009-06-26 20:28:02)


If destiny is against us, just too bad for it!

Offline

#6 2009-06-26 12:55:12

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [resolved] What is this error?

Atleast your quotes are wrong. Use real straight quotes, you are using curly.

So, change from:

<txp:php>
	global $locale;
	setlocale(LC_ALL, ‘fr_FR’);
	echo posted(array(‘format’ => ‘%d. %B %Y’));
	setlocale(LC_ALL, $locale);
</txp:php>

To correct ones:

<txp:php>
	global $locale;
	setlocale(LC_ALL, 'fr_FR');
	echo posted(array('format' => '%d. %B %Y'));
	setlocale(LC_ALL, $locale);
</txp:php>

Offline

#7 2009-06-26 13:00:36

Germaris
Member
From: Montreal, QC Canada
Registered: 2005-11-12
Posts: 44
Website

Re: [resolved] What is this error?

Congratulations!
And a big THANK YOU: You solved the problem!

Have a very nice day.
Best regards,

Gerard

Last edited by Germaris (2009-06-26 13:03:03)


If destiny is against us, just too bad for it!

Offline

Board footer

Powered by FluxBB