Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-15 17:35:58

valmac
New Member
Registered: 2008-04-15
Posts: 6

Problems publishing articles

WE recently took over a voluntary organisation website which uses Textpattern. We’ve never used it before and are a bit lost. The clients made the article and then we assigned the article to a section and to and navigation in the template. However, the pages are blank. I’ve followed the instructions to set it to testing mode and look for errors but I can’t see any on the new pages. We’re obviously doing something wrong but have no idea what. The website is www.rapeandabusline.co.uk and the pages are for events and helpus. I’ve left it in testing mode currently. Any assistance anyone can provide would be much appreciated.
many thanks
Val

Offline

#2 2008-04-15 18:02:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Problems publishing articles

valmac wrote:

The website is www.rapeandabusline.co.uk and the pages are for events and helpus. I’ve left it in testing mode currently.

Your link returns a 404


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2008-04-15 18:25:14

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: Problems publishing articles

www.rapeandabuseline.co.uk

Which pages are “missing”, Val? I can see the site fine, and only

www.rapeandabuseline.co.uk/helpus and www.rapeandabuseline.co.uk/events are empty – but that well might be right…


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

#4 2008-04-15 18:32:17

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

Re: Problems publishing articles

There was a typo in the link.

Val

Are ‘events’ and ‘helpus’ sections or articles? What permanent link mode is the site using (see preferences)? It would be easiest if you could switch to ‘debugging’ mode and post the tag trace here (you will find it in the source code, at the bottom). It will show us the tags and forms that are being used and if they are calling the right content.

Offline

#5 2008-04-16 08:37:53

valmac
New Member
Registered: 2008-04-15
Posts: 6

Re: Problems publishing articles

Wow – amazing response – thank you as I was beginning to pull my hair out. Should have stayed in the office longer as I did not have the details at home to log into the site

Yes sorry the correct url is http://www.rapeandabuseline.co.uk

The “events” and “helpus” are sections and I am trying to publish articles for these sections. Although the help us page is blank currently the article for events has text but it is not publishing this on the website.

The permanent link mode is set to /section/title

I’ve set it to debugging mode and pasted the tag trace below. Many thanks for all your help.

!-- Runtime:    0.2469 -->
<!-- Query time: 0.215125 -->
<!-- Queries: 11 -->
<!-- Memory: 1579Kb, <txp:body /> -->
<!-- txp tag trace: 
[SQL (0.000373): select name from `txp_lang` where lang='en-gb' limit 1]
[SQL (0.000591): select name, data from `txp_lang` where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.000195): select name, code from `txp_plugin` where status='1']
[SQL (0.019718): select * from `txp_section` where name = 'default' limit 1]
[SQL (0.103146): select host from `txp_log` where ip='83.104.229.109' limit 1]
[SQL (0.049581): insert into `txp_log` set `time`=now(),page='/',ip='83.104.229.109',host='datac.demon.co.uk',refer='',status='200',method='GET']
[SQL (0.000208): select user_html from `txp_page` where name='default']
[Page: default]
<txp:output_form form="content" />
	[SQL (0.000209): select form from `txp_form` where `name` = 'content' limit 1]
	<txp:if_section name="" >
		[<txp:if_section name="" >: true]
		<txp:article_custom form="default" section="article" />
			[SQL (0.001127): select *, unix_timestamp(Posted) as uPosted from `textpattern` where 1 and Status='4' and Posted < now() and Section = 'article' order by Posted desc limit 0, 10]
			[SQL (0.035020): select Form from `txp_form` where `name` = 'default' limit 1]
			[Form: default]
			[article 2]
			<txp:title/>
			<txp:body/>
	</txp:if_section>
	<txp:if_section name="services" >
		[<txp:if_section name="services" >: false]
	</txp:if_section>
	<txp:if_section name="history" >
		[<txp:if_section name="history" >: false]
	</txp:if_section>
	<txp:if_section name="ral-today" >
		[<txp:if_section name="ral-today" >: false]
	</txp:if_section>
	<txp:if_section name="our-volunteers" >
		[<txp:if_section name="our-volunteers" >: false]
	</txp:if_section>
	<txp:if_section name="acknowledgements" >
		[<txp:if_section name="acknowledgements" >: false]
	</txp:if_section>
	<txp:if_section name="memberships" >
		[<txp:if_section name="memberships" >: false]
	</txp:if_section>
	<txp:if_section name="feedback" >
		[<txp:if_section name="feedback" >: false]
	</txp:if_section>
	<txp:if_section name="contact-us" >
		[<txp:if_section name="contact-us" >: false]
	</txp:if_section>
	<txp:if_section name="calls" >
		[<txp:if_section name="calls" >: false]
	</txp:if_section>
	<txp:if_section name="thank-you" >
		[<txp:if_section name="thank-you" >: false]
	</txp:if_section>
[ --- secondpass --- ]
 -->

(Edit: added bc. for better code display. -Els)

Last edited by els (2008-04-16 09:09:43)

Offline

#6 2008-04-16 09:18:12

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

Re: Problems publishing articles

I forgot to explicitely ask for a tag trace of a page that doesn’t show the right content :) Here is the relevant part of the ‘events’ page:

	<txp:if_section name="" >
		[<txp:if_section name="" >: false]
	</txp:if_section>
	<txp:if_section name="services" >
		[<txp:if_section name="services" >: false]
	</txp:if_section>
	<txp:if_section name="history" >
		[<txp:if_section name="history" >: false]
	</txp:if_section>
	<txp:if_section name="ral-today" >
		[<txp:if_section name="ral-today" >: false]
	</txp:if_section>
	<txp:if_section name="our-volunteers" >
		[<txp:if_section name="our-volunteers" >: false]
	</txp:if_section>
	<txp:if_section name="acknowledgements" >
		[<txp:if_section name="acknowledgements" >: false]
	</txp:if_section>
	<txp:if_section name="memberships" >
		[<txp:if_section name="memberships" >: false]
	</txp:if_section>
	<txp:if_section name="feedback" >
		[<txp:if_section name="feedback" >: false]
	</txp:if_section>
	<txp:if_section name="contact-us" >
		[<txp:if_section name="contact-us" >: false]
	</txp:if_section>
	<txp:if_section name="calls" >
		[<txp:if_section name="calls" >: false]
	</txp:if_section>
	<txp:if_section name="thank-you" >
		[<txp:if_section name="thank-you" >: false]
	</txp:if_section>

There are a number of if_section conditionals, but those for ‘events’ and ‘helpus’ are not there. So that is probably causing the problem.

You can add the code for the missing sections by copying the existing code for one of the other ones (and changing the section name of course), but if you can’t figure it out can you post the code on the page template from the first <txp:if_section name=""> to the last </txp:if_section>?

Last edited by els (2008-04-16 09:20:31)

Offline

#7 2008-04-16 11:50:32

valmac
New Member
Registered: 2008-04-15
Posts: 6

Re: Problems publishing articles

I presume I have to copy and paste this text into the html of the pages in question?

Oh dear – when I view the html page of the article I am getting this error:
Fatal error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) order by Posted desc limit 1’ at line 1 select ID from `textpattern` where Posted < from_unixtime() order by Posted desc limit 1 in /home/abuseline/html/textpattern/lib/txplib_db.php on line 61

Does this mean anything? One of the guys in my office thinks that we need to upgrade the Textpattern?

Hope you can help
many thanks

Offline

#8 2008-04-16 17:53:10

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: Problems publishing articles

Hi Val,

no php expert I, but I’m willing to bet that the error you’re getting is simply a result of a “typo” – for example, if you’ve copied and pasted code into a new page, you might have pasted a fancy “curly quote” rather than a “plain text” quotation mark.

If I’m copying and pasting code around in browsers, I always paste it into Notepad or similar first, to lose any styling which has been applied by the browser.


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

#9 2008-04-16 19:59:14

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

Re: Problems publishing articles

Val, if you can copy the code that is on the page template (Presentation > Page) and paste it here, we’ll tell you what to do.
If you are not using the latest version (4.0.6) upgrading is indeed recommended, but let’s get your page right first ;)

Offline

#10 2008-04-17 09:15:00

valmac
New Member
Registered: 2008-04-15
Posts: 6

Re: Problems publishing articles

many thanks guys – your help is really appreciated. this is the text from the page template. It may be that the client has pasted some “rogue” text from Microsoft Word into the Events page but the How to help us page has o text text on it. I presume if I copy and paste the text from the Events page into a text editor and save it as text and then paste it back in would remove these? I will bring this to their attention too for the future!
Val

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
<html lang=“en”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”>
<title>Rape and Abuse Line</title>
<script type=“text/javascript” src=“jazz_styles/p7_eqCols2_10.js”></script>
<style type=“text/css” media=“screen”>
<!—
import url("p7pm/p7pmv19.css"); import url(“jazz_styles/jazz_fixed3col_vert.css”);
—>
</style>
<!—[if IE 5]>
<style>
body {text-align: center;}
#layoutwrapper {text-align: left;}
</style>
<![endif]—>
<!—[if lte IE 6]>
<style>
div {height: 1%;}
</style>
<![endif]—>
<link href=“jazz_styles/basicprint.css” rel=“stylesheet” type=“text/css” media=“print”>
</head>
<body onLoad=“P7_equalCols2(1,‘leftboxwrapper’,‘P’,‘centerwrapper’,‘P’,‘rightboxwrapper’,‘P’)”>
<div id=“skiplinks”>
<a href=”#centercontent”>Skip navigation</a></div>

<div id=“layoutwrapper”>

<div id=“leftboxwrapper”>
<div id=“leftbox”>

<div id=“menubar”>
<ul id=“p7PMnav”>
<li><a href=”/”>Home</a></li>
<li><a href=“our-volunteers”>Our Volunteers</a></li>
<li><a href=“ral-today”>RAL Today</a></li>
<li><a href=“events”>Events</a></li>
<li><a href=“helpus”>How to Help Us</a><li>
<li><a href=“feedback”>Feedback</a></li>
<li><a href=“contact-us”>Contact Us</a></li>
<li><a href=“history”>History</a></li>
<li><a href=“memberships”>Memberships</a></li>
<li><a href=“acknowledgements”>Acknowledgements</a></li>
<li><a href=“calls”>Call Statistics</a></li>
<!—[if lte IE 6]><style>#p7PMnav a{height:1em;}#p7PMnav li{height:1em;float:left;clear:both;width:100%}</style><![endif]—>
<!—[if IE 6]><style>#p7PMnav li{clear:none;}</style><![endif]—>
</ul>
</div>

<div id=“leftcontent”>
<p>&nbsp;</p>
</div>
</div>
</div>

<div id=“centerwrapper”>

<div id=“masthead”>
<div id=“logodiv”><img src=“images/jazz_logo.jpg” alt=“RAL” width=“340” height=“177”></div>
</div>

<div id=“centerbox”>

<div id=“centercontent”>
<txp:output_form form=“content” />
</div>

<div id=“centerbottom”>
<div id=“centerbottominfo”><img src=“images/jazz_bottomleft.jpg” alt=“RAL” width=“300” height=“32”></div>
</div>
</div>
</div>

<div id=“rightboxwrapper”>
<div id=“rightbox”>
<h2 id=“rightheader”>0808 800 0123 <span style=“font-size:.75em”>Answered by women on most evenings from 7pm – 10pm</span><br> <br>
0808 800 0122 <span style=“font-size:.75em”>Answered by men on selected evenings from 7pm – 10pm</span></h2>
<div id=“rightcontent”>
<p>24 hour answer services will provide latest times that lines will be open.</p>
</div>
</div>
</div>

<div id=“footer”>
<p>Member of The Telephone Helplines Assoc. | Reg. Charity SC007515 | Investor in People </p>
<p>Website by: <a href=“http://www.cinqpages.com/”>Cinq Pages</a> & <a href=“http://www.rocplus.co.uk/”>ROC Plus Ltd</a></p>
</div>

</div>
</body>
</html>

Offline

#11 2008-04-17 14:27:07

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

Re: Problems publishing articles

<div id="centercontent">
<txp:output_form form="content" />
</div>

Oh sorry, what I’m looking for appears to be in a form named ‘content’. Could you post that form as well?

Offline

#12 2008-04-17 15:16:24

valmac
New Member
Registered: 2008-04-15
Posts: 6

Re: Problems publishing articles

Hope this is what you need?
<txp:if_section name=”“ >
<txp:article_custom form=“default” section=“article” />
</txp:if_section>

<txp:if_section name=“services” >
<txp:article form=“default” />
</txp:if_section>

<txp:if_section name=“history” >
<txp:article form=“default” />
</txp:if_section>

<txp:if_section name=“ral-today” >
<txp:article form=“default” />
</txp:if_section>

<txp:if_section name=“our-volunteers” >
<txp:article form=“default” />
</txp:if_section>

<txp:if_section name=“acknowledgements” >
<txp:article form=“default” />
</txp:if_section>

<txp:if_section name=“memberships” >
<txp:article form=“default” />
</txp:if_section>

<txp:if_section name=“feedback” >
<txp:article form=“default” />

<txp:zem_contact to=“ral@pobox10.wanadoo.co.uk” subject=“RAL website feedback” redirect=“thank-you” from=“feedback@rapeandabuseline.co.uk”>
<txp:zem_contact_textarea label=“Feedback” />
<txp:zem_contact_submit label=“Send” />
</txp:zem_contact>

</txp:if_section>

<txp:if_section name=“contact-us” >
<txp:article form=“default” />
</txp:if_section>

<txp:if_section name=“calls” >
<txp:article form=“default” />
</txp:if_section>

<txp:if_section name=“thank-you” >
<txp:article form=“default” />
</txp:if_section>

Offline

Board footer

Powered by FluxBB