Search

Shouldn’t it be possible to integrate these changes to __processDatasources() by using some cool features like extending classes or so? I thought all this object oriented programming was about allowing things like this easily?!

Probably not when the method is protected or private. OO usually allows this sort of thing, but only when it’s planned for from the start — I’m guessing Alistair never presumed that we’d be delving into and extending the core as much as we do :-)

Ah okay.

So you’d say Alistair underestimates us? ;)

Everybody underestimated:

  • Art historians and
  • how things get “Dunn”.

:-)

*g*

I meant that the changes would be in the core ASAP ;)

I meant that the changes would be in the core ASAP ;)

Are these changes present in the integration branch?

Nils, can you confirm that your method is now working with 404 redirect so I get my message body to send in emails?

does this work with send multiple?

Hah, I’m going to rewrite the readme ASAP, the only changes you need to make are:

Edit symphony/lib/toolkit/class.frontendpage.php Replace private function __processDatasources... with public function __processDatasources($datasources, &$wrapper, $params = array()) { Change the first $this->_env['pool'] = array(); into $this->_env['pool'] = $params;. Change the first $pool = array(); into $pool = $params;.

Save. You’re done. I will try my best to make sure these updates are in the next stable.

Have made these changes in the core, but still get no body message in my emails.. any pointers? Nils a walk through of the 404 technique would be very handy for me.. you know an idiots guide.. hee hee :)

moonoo2: I’m in the same problem, I can’t get my body message appears in the email, did you solve this problem?

The problme was my server has allow_url_fopen disabled and the file_get_contents call that use the extension to get the conten of the email didn’t works.

To solve it, I put this modification in the extension driver code:

// Add values:
if (ini_get('allow_url_fopen') == 'On')
  $email['message'] = (string)file_get_contents($email['generator']);
else {
  $c = curl_init($email['generator']);
  curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
  $email['message'] = curl_exec($c);
  curl_close($c);           
}

Hope this help others to solve same problem.

Can you confirm if I add the above code to the email template extension driver code?

Where abouts in the code should the block of code above go?

Cheers Nick.. done this on a 2.0.6 install still no luck getting the body of message to be sent.. hmmm

The problme was my server has allow_url_fopen disabled and the file_get_contents call that use the extension to get the conten of the email didn’t works.

guillem_l, thanks for finding and solving the problem with this extension!

Hi moonoo2,

Did you try to enable the allow_url_fopen on your server? Maybe this could be the first step, if you can do that the extension works without any modification, if you can not modify this param then the cURL call should work.

Good luck!

allow_url_fopen is enabled on the server but still no body in message..

my email xsl file is reading the data correctly because I can see the resulting entry when I place this path in the browser URL:

http://www.mywebsite/advertise-email/{$entry/@id}

The entry/@id bit is replaced by a numeric value and I see the relevant responses on the page. so I know it is working thus far.. and I do get emails sent to the desired email address in the email template setup form.

Just isn’t sending the body with the email.

Does the fact the site is on a shared host make any difference what so ever?

Ok so no luck in getting the message body to send even after all the changes mentioned here!

array(8) {
  ["template_id"]=>
  string(1) "1"
  ["subject"]=>
  string(51) "Job Advertisement: test, ID468"
  ["sender"]=>
  string(37) "myname@mywebsite.com"
  ["senders"]=>
  string(24) "website@mydomain.com,"
  ["recipients"]=>
  string(19) "myemail@gmail.com"
  ["message"]=>
  bool(false)
  ["condition_id"]=>
  string(1) "1"
  ["entry_id"]=>
  int(468)
}

What is the bool(false) mean in this var dump of the event from my form submission?

moonoo2, guillem_l resolve your (mine too) problem.

check the solution in Comment #97

thanks a lot guillem_l and buzzomatic for the great extension

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details