Blog Problems - parsing error

6 posts by 4 authors in: Forums > CMS Builder
Last Post: June 13, 2013   (RSS)

Hello,

I have been at this all day :(  I managed to get the details page working (for first record) fine when you go directly to it in URL.  http://enlightenthesoul.com/full_story.php

However when I click on Back to List link I get the following pop-up window:  Set List Page Url for this section in: Admin > Section Editors > ETS Blog > Viewer Urls

When I click on blog page I get the following error:  Parse error: syntax error, unexpected $end in /home/enlig124/public_html/blog.php on line 227

I have combed through this several times and cannot see where the problem has occurred.  In need of some assistance from the pros!

Thankyou,

ko19

By gregThomas - June 13, 2013

Hi Knight owl, 

You need to set the list page URL in CMS Builder so that the _link can be created by the getRecords function. You can do this by logging into CMS Builder, then going to the Section Editor section, then click the modify link for the ETS blog section. At the top of the next page will be four tabs, one of which is Viewer URLs, click this tab. Finally there should be a text box called List Page URL, as moh3 said, it maybe a full url ( http://example/blog.php ) or ( blog.php ) depends on how folder of your site is set up. 

The parse error is likely to be a missing closing bracket. What are you using to edit your PHP files? Their are several great free IDE's that would help you spot the error:

http://aptana.com/ - Comprehensive, great validation, but can be buggy and slow at times.

http://www.activestate.com/komodo-ide - The most popular choice at Interactive tools. Comprehensive, great error handling.

http://www.sublimetext.com/ - Super fast, lots of useful short cuts, tons of add-ons and a great community. No PHP validation unless you install a plugin.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Thankyou for this; I've set the Viewer URL's and I am still getting the same. 

By gregThomas - June 13, 2013

Hi,

Could you attach /copy your code into a post for me? What have you set the  List Page URL as?

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Damon - June 13, 2013

Hi,

The blog is now displaying correctly. The issue was that the blog foreach loop was missing the closing foreach code:

<?php endforeach; ?>

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/