Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Custom error templates give php errors when rendered.

Status Resolved
Add-on / Version Custom System Messages 2.5
Severity Critical
EE Version 2.7.1

John Baxter

Jun 02, 2014

Hi Brian,

I’ve just installed the add-on and configured it (see attached image) and i’m getting the errors as per the second attachment!

Do you know why this might be happening? It’s very odd, i don’t understand why i have _POST missing the $!

Thanks!

John

#1

BoldMinded (Brian)

Thats not an error message from CSM. Mo’ Variables is what is having the issue. CSM doesn’t delete the $_POST (not sure that can even be done in PHP), all it does is unset some of its own variables used. You’ll have to ask Rob about this one.

#2

John Baxter

Hey Brian,

It’s not just mo variables though, it’s gmaps, and another add-on all with the same issue. How can you be sure Mo Variables is at fault?

Thanks

John

#3

BoldMinded (Brian)

Because it says in the error message what line of Mo’ Variables the issue is. I sell enough copies to know that if this was a CSM issue I’d be getting more reports about it. Also, the latest version of Mo’ Variables has a function definition on line 339, so you’re probably using an out dated version of it. I’d upgrade first, then ask Rob.

#4

BoldMinded (Brian)

Another option is to uninstall extensions one by one until the error goes away to see which add-on is the cause. Backup your db first before doing that.

#5

John Baxter

Hmm, ok, but i didn’t have this issue until i installed CSM and the site has been unchanged for a while before i installed it.

That method in mo variables on line 339 simply wants to copy the $_POST array, it doesn’t actually destroy it, hence the error being on that line, also, the Mo Variables update just adds some mobile detection methods, nothing else.

I’ll, do what you recommend though.

Thanks Brian.

John

#6

BoldMinded (Brian)

It is curious, but the only references to $_POST in CMS are the following, none of which are malicious.

168          // So it doesn't save the error message too long.
  169:         if (empty($_POST) AND isset($_SESSION['csm_data']))
  170          {
  171              unset($_SESSION['csm_data']);
  ...
  424              $data['error'] = $data['type'] ? TRUE : FALSE;
  425              $_SESSION['csm_data'] = $data;
  426:             $_SESSION['csm_post'] = $_POST;
  427  
  428              $site_index = $this->EE->functions->fetch_site_index(true);
  ...
  565      {
  566          // unset things we don't want to save
  567:         unset($_POST['submit']);
  568:         unset($_POST['file']);
  569          
  570          $insert = array();
#7

John Baxter

Yeah, i’ve had a look through and that certainly seems to be the case.

Well, i guess for now, i’ll just mod those add-ons to actually check for existence of $_POST before using it.

Thanks for your time.

John

#8

BoldMinded (Brian)

John, this error rang a bell, and I was right: https://boldminded.com/support/ticket/614

Do you have CartThrob installed?

#9

John Baxter

Hi Brian,

I am indeed running CT. My version is newer than the date of that thread mind you.

However, i will go update, (i’m updating anything i can right now!!)

Thanks again for your time Brian, i appreciate it.

John

#10

John Baxter

Cartthrob update fixed it.

Thanks a million Brian, i’m not sure i would have thought of that without your assistance.

Thanks

John

#11

BoldMinded (Brian)

No worries. Sounds like a version of CT has some serious issues :(

#12

John Baxter

Well, certainly any add-on that is clearing out the whole post array rather than it’s own vars is not going to play well with others :(

Thanks again Brian

John

Login to reply