Search

Hi everybody, How can I send other params (for example 'language') to email template?

Thanks

Can you please provide more details? What do you try to achieve (and what do you mean by "send params")?

Yes, you are right, sorry.

I'm building a multilingual site and I would like to send registration emails in different languages. So, I would like to add 'language' (that comes from another extension) param to Email Template parameters pool. Is it possible?

I hope I made myself clear

You could use a hidden language input field in your registration form and populate it with your current-language parameter. Then add it to your email template datasource and use it as your language variable in your xslt template.
This is how i have done this in the past...

Using Symphony 2.5.2 and ETM 7.1.1, I'm experiencing the same error as an earlier commenter when I try previewing one of my templates:

"Error compiling xml with xslt: XSLTProcessor::importStylesheet(): compilation error"

I've tried removing all variables from the xsl template, and I've tried changing the relative path in the accompanying php file, all to no avail. I'm still unable to preview my templates.

Emails aren't being sent--and I assume this is the reason why. Can somebody help?

This doesn't look the same as the error you have linked to. Anyway, I have seen your error many times. It simply means that something is wrong with your (XSLT) stylesheet. Try to backup your file and use the default stylesheet — the error should vanish. Then re-implement your XSLT logic step by step. If you still need help, please post your stylesheet here.

My goodness, you're right—the error I linked to isn't the same at all! I blame lack of sleep.

Thanks for your help. I agree, this seems like a very typical error. However, I'm receiving it all the time! I've made several new, blank test templates and I receive this error no matter what. I've attached a screenshot of the full error message. Perhaps there's something terribly wrong that I'm overlooking.

Thanks again for any help you can give me.

Attachments:
Screen Shot 2014-12-19 at 17.27.59.png

This sounds untypical, so can you please try and check your installation in a different environment, e.g. on a virtual server? (I would also try and use a file path without + and space characters. You never know...)

Hello, I m running symphony 2.4 with ETM 7.1.1, locally with MAMP. When I click on preview html layout it downloads the text version of html and doesn't allow the preview in the browser. For plain text there is no issue, I can see it in the browser. Any idea to fix the html preview?

@ vincentd: Please check the response headers in your browser's debugger. There should be a header called Content-Type with the value text/html. Can you confirm that (or do you see a different value)?

Thanks Michael, you were right. I didn't know how to see the content and even more because it didn't let me open the preview with safari. So I searched in the extension and found in content/content.templates.php line 235

    if ($template == 'plain' && !isset($_REQUEST['debug']) && !isset($_REQUEST['profile'])) {
        header('Content-Type:text/plain; charset=utf-8');
    }

So I added right after:

if ($template == 'html' && !isset($_REQUEST['debug']) && !isset($_REQUEST['profile'])) {
    header('Content-Type:text/html; charset=utf-8');
}

And it solved the issue, i can now open the html preview with Safari. Perhaps there is a better code but at least it s solved, thanks

Re: my earlier problem—Michael, thanks for encouraging me to try changing the server path. I moved everything to a different path within my local environment (no + characters in the path) and it all works perfectly! Thanks for your help.

Should this be considered a flaw of ETM? I've configured multiple installations of Symphony with this this server path and never experienced any errors until I did this with ETM.

Thanks again for your help, Michael.

@vincentd: I will try and keep this on the radar. Symphony itself is supposed to send the Content-Type: text/html header. I have no idea why this is not the case for you. Could you tell me which Content-Type is sent without the "hack"?

@nigel: Yes, this might be a flaw of ETM. Can you please post the problem (including the screenshot) in the GitHub issue tracker? (I don't have much time to look into it, but maybe @creativedutchmen can take a look.)

Hi Michael and merry Christmas. Before the hack, as soon as I click on the link to preview, it downloads the file. It s pure text without any extension, the file is called html, but not html.html. So I have to add .html to open and see the content (result of the template). As it doesn't allow me to open it in the browser (before adding the .html) I don't know how to check for the content-type, how can I check?

Indeed the browser's debug tools won't help if the file gets downloaded. You might use different tools (like Rested on a Mac, or curl or wget in the Terminal), but you would have to log in to Symphony with these tools in order to load the file. That is tricky…

Simplest solution: If you have Firefox, you could install the Live HTPP Headers extension, which shows the headers even for downloaded files.

Searching throught the forum I couldn’t find an answer to this:

I have a form that creates up to 30 entries an once, so obviously it has »allow multiple« checked. I want so send a confirmation e-mail using ETM. Problem is it sends an e-mail for each of the created events instead of a single one related to the event itself.

Is there a way to do this?

Ok I think I managed to get this working by creating having the entry creation in an event and the notification in another event that gets fired with a hidden submit-input.

However, I’m trying to use this in conjunction with the members extension and my notification mails currently get sent to all members.

I have a datasource for the member details including e-mail-address which is filtered by {$member-id}. However this filter is apparently not applied during event-creation, so all members are selected. Is there a way to include the $member-id-param in the event?

Easy way out would be to add the member id in the other event that gets fired with a hidden submit-input.

Alternatively I guess you'll have to play a bit with the Event php file.

Thanks Jonathan,

so I would have to filter my member-details-datasource with {/data/events/other-event/post-values/member-id}?

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