2

This is related to an channel module php error I am getting. I've been able to determine that if I use disable="custom_fields" the error goes away. On a backup copy of the site I've gone in and removed every addon via the control panel. However, the error persists and is once again eliminated by disabling custom_fields.

My question is, what is my next step in tracking down the bug (or "bad data" as was described to me in my original post).

This is the template that throws the error.

{exp:channel:entries channel='member' status='not closed' dynamic='no' orderby="title" sort="asc" disable="member_data|trackbacks|pagination"}
    <li>{title}</li>
{/exp:channel:entries}

This template does not throw the error.

{exp:channel:entries channel='member' status='not closed' dynamic='no' orderby="title" sort="asc" disable="member_data|trackbacks|pagination|custom_fields"}
    <li>{title}</li>
{/exp:channel:entries}
2

Based on your referenced question, it looks like the problem is with a custom field that stores a file ("filename" and output buffer references).

If you can identify which add-on that is, you can drop some quick & dirty debug statements in its PHP. Things like:

echo 'got here'; exit;

moving that forward line by line until you reach the point where the error occurs. Or:

var_dump($some_addon_var); exit;

To output the variables the add-on is fetching data into. That might illuminate what the "bad data" is.

From what you've described, it seems like disabling the add-ons isn't taking effect if you have custom fields enabled. That sounds like a separate issue, but if you can tackle the add-on error, you can clean up the data.

Update: Noting that you've deleted add-ons, you'd need to reinstall the add-on that's working with files to troubleshoot based on these steps.

Have you tried looking at the entries directly? If you can determine which entry the error is coming from, you can use PHPMyAdmin, Navicat or Sequel Pro to browse the exp_channel_data table and peek in the fields. I'm not sure how much luck you'll have identifying "bad data" that way, but that's where you need to look.

| improve this answer | |
1

Assuming the error is caused by a custom fieldtype (which maybe it is not, now that I see your updated question!)

One approach which will help identify the fieldtype that is causing issues:

Create a simplified template with a channel:entries loop that references each of the custom fields associated with that channel. Then comment out the custom fields in the template one by one until the error disappears.

So a pared-down template coupled with the process of elimination. This should give an indication which fieldtype is causing the error.

| improve this answer | |
  • I edited original with the exact template code I am using. As you can see, I am using no custom fields. – Dan Johnson Jan 29 '13 at 17:21
  • Ah, since disabling custom fields removed the error I had assumed the error was related to a custom fieldtype. – Alex Kendrick Jan 29 '13 at 17:22
  • Yeah, the consensus I've received is that there may be data in the database from a deleted add-on. I just don't know how to figure that out. – Dan Johnson Jan 29 '13 at 17:26
  • As @mark said, Re-installing any deleted add-on that still has data in the system plus looking in the exp_channel_data table (and specifically looking for file-related data) may help you identify the issue. – Alex Kendrick Jan 29 '13 at 17:36
1

I've tracked the error down to a single entry. I did so by loading entries in opposite directions:

orderby="title" sort="asc" limit="xx"
orderby="title" sort="desc" limit="xx"

I did this until I reached a single entry and hit the php errors. At this point I did a search for that entry's title in the database. It came up with one entry in exp_channel_data (as expected), however in exp_channel_titles there were two instances with the same title. I removed the entry that was not associated with the entry data and all is loading as expected.

The cause: While I cannot be certain, my guess is that: we had several editors inputting data at the same time. This entry was inputted twice and one was subsequently deleted. For some reason the title row was not removed and caused the conflict. We are using Structure, so it could be a bug with Structure? I cannot be sure.

| improve this answer | |
  • 1
    What this doesn't solve is why disabling 'custom_fields' averted the php errors on the entry. – Dan Johnson Jan 29 '13 at 19:30
  • 1
    Does disabling custom_fields remove the join to exp_channel_data and just return data from exp_channel_titles? The join would be empty on the exp_channel_titles record without a corresponding exp_channel_data record. – Mark J. Reeves Jan 29 '13 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.