error in init.php on newbie pod page

0

I've just created a couple of pods, templates and a page following the demo in the Introduction video. I've added the page to my menu, but when I navigate to the page in question I get the following error

Parse error: syntax error, unexpected T_VARIABLE in /home/wpstage/public_html/mysitename/wp-content/plugins/pods/init.php(60) : eval()'d code on line 9

I've also created a custom page theme and included the code from 'Setting up our Team page' in the MBN tutorial - this works fine and returns the records for my pod correctly.

I am using WP 3.1.3 and I've upgraded pods to 1.9.63

What could be causing the error? Any pointers gratefully received.

asked Jun 26 '11 at 1:16

caroig

16

add comment
enter at least 15 characters

2 Answers

0

You've got a syntax error somewhere, most probably a missed semicolon at the end of line 8 or unbalanced parenthesis in line 9. PHP is not very helpful with its error messages.

I find that it is easiest to edit PHP code for pods using a code-highlighting editor on my local machine (I like Notepad++ and NetBeans). I also have a local copy of PHP and I run a syntax check on it locally before copying and pasting it into the Pods edit box:

  php -l /path/to/file.php

answered Jun 26 '11 at 2:47

chris.pilko

889

add comment
enter at least 15 characters
0

Thanks chris - an additional ' in the pod page code was giving me the error.

answered Jun 26 '11 at 3:13

caroig

16

add comment
enter at least 15 characters