Closed (fixed)
Project:
XCRI-CAP Feed
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2012 at 15:07 UTC
Updated:
7 Feb 2013 at 18:20 UTC
Hi
I'm trying to get this working with some dummy data. I've set up a dummy course term, provider term, venue term and qualification term. I then created a 'course presentation' and linked it to my dummy terms. However when I preview the View or go to the /xcri-cap path my XML feed stops dead immediately after it outputs :
<mlo:credit>
<credit:level>Looking at the xcri-cap-feed.tpl.php file it looks as though the template is treating the 'credit' field collection exactly as it treats the other field variables using this code :
<?php foreach ($course['credits'] as $credit): ?>
<mlo:credit>
<credit:level><?php print $credit['level']; ?></credit:level>
<?php if($credit['scheme']): ?>
<credit:scheme><?php print $credit['scheme']; ?></credit:scheme>
<?php endif; ?>
<credit:level><?php print $credit['value']; ?></credit:level>
</mlo:credit>
<?php endforeach; // credits?>My dump ( image attached ) of $course shows that the structure of a field collection differs and I guess that is why this fails ?
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| credits.jpg | 88.64 KB | El Bandito |
Comments
Comment #1
El Bandito commentedAs a quick fix/bodge I added this to the xcri-cap-feed.tpl.php file at line 157 i.e. just before it processes $course['credits'].
This just removes the FieldCollectionItemEntity objects that exist at the beginning of the array, leaving the structure that the existing template file seems to expect.
I am using the Field Collection module 7.x-1.0-beta4. I wonder if this is what has introduced this problem ?
Comment #2
hanoiiThis was sorted properly in the code, FieldCollectionItemEntity should be there at all.