Drupal printing violations on region rendering

I ran into a stumbling block with

<?php print render ($page['pages_machine_name']); ?>

      

on the Drupal website. The problem only started when moving from 7.33 to 7.36.

What happens is, instead of displaying the page content, which in this case is <ul>

, it puts multiple wrappers in <div>

and <span>

around <ul>

and around its content. This is fine, but what happens is that they are rendered with incomplete links and as such break the rest of the pages:

<a href="http://www.domain.co.uk&lt;div class=" field="" field-name-field-link-three-url="" field-type-text="" field-label-above"="">"&gt;
<div class="field field-name-field-link-three-name field-type-text field-label-above"><div class="field-label">Link Three | Name:&nbsp;</div><div class="field-items"><div class="field-item even">Our people</div></div></div></a>

      

As you can see, at the end of the website's domain is marked with nothing more than an actual character, and as such, it breaks down all the other tags that follow it.

Does anyone know what could be causing this and what can be done to fix it?

Thanks in advance for any help you can provide :)

+3


source to share


1 answer


While searching, I found this link where the code suggests the following solution: (Edited from 'filename' to 'value' to get get the text value inside the field) <?php print $node->field_name_goes_here['und']['0']['value']; ?>

This provides what I was looking for, in this case only the contents of the field. Hope this can help others in the future.



0


source







All Articles