close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

'articles' not showing

Thread began 7/31/2013 7:42 am by Jamie | Last modified 7/31/2013 12:52 pm by Jason Byrnes | 1366 views | 9 replies |

Jamie

'articles' not showing

Hey Jason

Have got a blog page list which is linking to the detail page but the article isnt showing at all

Have attached the 2 pages if you could give me some steerage on where I have gone wrong would really appreciate it

Many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

I dont follow, please provide more details.

Sign in to reply to this post

Jamie

if you click on one of the blog titles on the 'blog.php' page, the 'article.php' page is blank where the article should be...

Sign in to reply to this post

Jason ByrnesWebAssist

well, that would mean there is a problem with the recordset to return the articles on the article.php page.


to see what the recordset SQL that is being generated is, add the following code in the body tag:

php:
<?php echo($query_limit_BlogRS); ?>



it looks like you are using mod rewrite on this page, the rewrite rule may not be passing the expected URL variables.

the recordset is expecting URL variables named perm or id, to see what URL variable are being passed, use the following code in the body:

php:
<?php vart_dump($_GET); ?>
Sign in to reply to this post

Jamie

OK, I get the following:

SELECT * FROM blog WHERE BlogID = -1 OR BlogPermalink = 'It--s-all-About-the-Experience' LIMIT 0, 0
Fatal error: Call to undefined function vart_dump() in /home/motle8wh/public_html/article.php on line 87



What can I infer from this please?

Sign in to reply to this post

Jason ByrnesWebAssist

3 things:

1) the limit being added to the recordset is causing it to be blank:
LIMIT 0, 0

tells my sql to limit the result to 0. remove this line:
$query_limit_BlogRS = sprintf("%s LIMIT %d, %d", $query_BlogRS, $startRow_BlogRS, $maxRows_BlogRS);

2) the perm URL variable is passing correctly

3) I have a syntax error:
<?php vart_dump($_GET); ?>

should be:
<?php var_dump($_GET); ?>

Sign in to reply to this post

Jamie

OK, have removed that line and replaced the line from no 3. and getting "Query was empty"

Sign in to reply to this post

Jason ByrnesWebAssist

ok, change this line:
$BlogRS = mysql_query($query_limit_BlogRS, $PowerCMSConnection) or die(mysql_error());

to:
$BlogRS = mysql_query($query_BlogRS, $PowerCMSConnection) or die(mysql_error());

Sign in to reply to this post

Jamie

thats perfect Jason... thanks

now, last question is what would have done that (added the limit) that caused this issue in the first place?

Sign in to reply to this post

Jason ByrnesWebAssist

I dont know. I Wasn't there when it was created, so cant say why it got created that way.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...