Hi, I’ve been working on a jobs listing site for a client, and all of a sudden, I’m getting some bad errors, and my pages won’t display.
I had set up a tagged blog using the instructions here:
http://wiki.modxcms.com/index.php/Tagged_blogging_with_Ditto . My client posts jobs in different industries, and each job post will be tagged with one category(industry).
I had a template set up for the home page, and one for the "Jobs" page. Each of these templates included a Ditto call as per the "Tagged blogging with Ditto" tutorial. Everything was working great.
I then upgraded to the latest version of Modx, which I’m wondering if this is what may have caused my issue, and then today I did some further development on the job listings by working on the display of each individual listing. I created a new template ("Listing") and went through the 8 test job posts I have and edited them to use that template.
And then all hell broke loose! When I try and load either the "Home" page or the "Jobs" page, I get the following error:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: implode() [function.implode]: Invalid arguments passed
Error type/ Nr.: Warning - 2
File: C:\wamp\www\erc\manager\includes\document.parser.class.inc.php(770) : eval()'d code
Line: 103
Parser timing
MySQL: 0.0051 s (6 Requests)
PHP: 0.0678 s
Total: 0.0729 s
I can not figure out what would be causing this, besides a problem with the Ditto calls. I’m posting the templates from my home and job pages, and the chunk code templates that Ditto uses to format output. Any help would be so greatly appreciated!
Home page:
{{head}}
<body id="home">
<div id="container">
<div id="header_wrap">
<div id="header_phone">Call us today: <span></span></div>
<div id="header">
<h1><span>acme Jobs</span></h1>
{{navigation}}
</div>
</div>
<div id="content_wrap">
<div id="content">
<div id="intro">
<div id="pitch">
<p>We specialize in the recruiting and placement of individuals in the Medical, Accounting, Finance, Banking, and Agriculture industries.</p>
<a class="cta button" href="[(site_url)]contact.html" title="Contact us today!"><span>Contact us today!</span></a>
</div>
<img src="/acme/images/banner.jpg" alt="" />
</div>
<div id="welcome">
[*content*]
<div id="features">
{{our_services}}
{{benefits}}
<div class="cleared"></div>
</div>
</div>
<div id="hot_jobs">
<h2>Hot Jobs</h2>
[!Ditto? &startID=`5` &tpl=`hotjob` &display=`4` &tagData=`tvtags` &tagDelimiter=`,` !]
</div>
<div id="testimonials">
<h3>What our clients are saying:</h3>
<div class="cust_quote">
<blockquote>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </blockquote>
<cite>Joe Black</cite>
</div>
<div class="cust_quote">
<blockquote>Ut enim ad minim veniam, quis nostrud exacmeitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </blockquote>
<cite>Mary Pomegranate</cite>
</div>
<div class="cust_quote">
<blockquote>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </blockquote>
<cite>Charles Plaidstock</cite>
</div>
<div class="cleared"></div>
</div>
</div>
</div>
<div id="footer_wrap">
{{footer}}
</div>
</div>
</body>
</html>
The Jobs page:
{{head}}
<body id="jobs">
<div id="container">
<div id="header_wrap">
<div id="header_phone">Call us today: <span></span></div>
<div id="header">
<h1><span>acme Jobs</span></h1>
{{navigation}}
</div>
</div>
<div id="content_wrap">
<div id="content">
[*content*]
[!Ditto? &startID=`5` &tpl=`job-post` &tagData=`tvtags` &tagDelimiter=`,` &summarize=`5` &paginate=`1` &paginateAlwaysShowLinks=`1`!]
<p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles | Page <strong>[+currentPage+]</strong> of <strong>[+totalPages+]</strong> </p> <div id="ditto_pages"> [+previous+] [+pages+] [+next+] </div>
</div>
{{sidebar}}
<div id="footer_wrap">
{{footer}}
</div>
</div>
</body>
</html>
The "hotjob" template chunk the home page Ditto call uses:
<div class="hotjob [+tags+]">
<div class="job_date">[+pub_date:date=`%b<strong>%d</strong>`+]
</div>
<h3 class="job_title"><a href="[~[+id+]~]">[+title+]</a></h3>
[[tagLinks? &id=`[+id+]` &tv=`tags` &separator=`, ` &fap=`1` &path=`categories` &label=`Tags: ` &style=`job_tags`]]
<div class="job_info">
<p>[+introtext+] [+link+]
<a class="more_link" href="[~[+id+]~]">View this job</a>
</p>
</div>
<div class="cleared"></div>
</div>
And, finally, the "job-post" template chunk that the Jobs page Ditto call uses:
<div class="job_post [+tags+]">
<div class="job_date">[+pub_date:date=`%b<strong>%d</strong>`+]
</div>
<h3 class="job_title"><a href="[~[+id+]~]">[+title+]</a></h3>
[[tagLinks? &id=`[+id+]` &tv=`tags` &separator=`, ` &fap=`1` &path=`categories` &label=`Tags: ` &style=`job_tags`]]
<div class="job_info">
<p>[+introtext+] [+link+]
<a class="more_link" href="[~[+id+]~]">View this job</a>
</p>
</div>
<div class="cleared"></div>
</div>
Again, any help would be greatly appreciated!
Thanks!