lhilton/EE-Rewrite-Links — Issue #1: PHP Error when using multiple channels in the Channel Entries tag
Author: bcrabtree
Created: 2011-11-03 19:19:17+00:00
State: open

Hi,

I found your plugin on Devot:ee and I love it.

I did find an issue though when using two or more channels in the Channel Entries tag where one channels custom field is wrapped with your plugin and the other channel does not have the same field.

For example if I have:
{exp:channel:entries channel="channel_1|channel_2"}
{if channel_1_custom_field != ""}
{channel_1_custom_field}
{/if}
{if channel_1_custom_field == ""}
{exp:rewrite_links}{channel_2_custom_field}{/exp:rewrite_links}
{/if}
{/exp:channel:entries}

This returns the following errors:

A PHP Error was encountered
Severity: Warning
Message: DOMDocument::loadHTML() [domdocument.loadhtml]: Empty string supplied as input
Filename: rewrite_links/pi.rewrite_links.php
Line Number: 51

A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/llocke4/public_html/quincylist.com/cms/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 405

If I remove {exp:rewrite_links} from the channel:entries tag or remove "channel_1" from the channel:entries tag the error does not occur.

Any thoughts?