I have a field collection setup with a Full HTML field within it, when a user uses the WYSIWYG (CKEditor)'s link module to create a link it gets entered into the source as a link like /node/83. Then when the page renders the link still goes to /node/83, while this link works fine, we would like for it to convert to the user friendly URL. The full HTML fields do this outside of a field collection. Any idea why this does not work within a field collection?

Thanks!
Jon

Comments

jmuzz’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

I tried this with a field collection containing a text field using full HTML. I added a link to a node using the ckeditor link module and the URL was converted to the path alias I had given the target node.

If this is still happening please reopen with more specific steps to reproduce.

ChetTheDev’s picture

The Reason why i had an issue with this is because i was rendering fields incorrectly. EX.
print $content_block->field_section_header['und'][0]['value']
i was printing out the value when i needed to print out the 'safe_value'... but i found a better way to render fields by using field_view_field.
print render(field_view_field('field_collection_item', $content_block, 'field_section_header'))
a good read on why to use field_view_field().
https://www.computerminds.co.uk/articles/rendering-drupal-7-fields-right...