Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

issue with admin notifications - message too long?

More
9 years 4 months ago #135825 by Siem
I have created a large survey. The results of each survey is mailed to the examiner.
The code to calculate all scores is in the admin notification. This code is quite long. The whole notification is about 500 lines of HTML and Expression Manager code.

It works, but it seems that the whole notification message is too long for LimeSurvey, after about 62.800 characters / 113 lines. The editor will just cut in the middle of a line and ignore the rest (the rest doesn't get saved). After the line that is cut in the middle it will create valid HTML.
So my code that's missing a lot of lines ends up looking like this on the last few lines:
Code:
<td>{if((countif('A1',Q155,Q160,Q165,Q170,Q175,Q180,Q185,Q190,Q195,Q200,Q205,Q210,Q215,Q220)+countif('A2',Q71,Q72,Q73,Q74,Q75,Q146,Q147,Q148,Q149,Q150,Q221,Q222,Q223,Q224)+1)==4,"0","")} {if((countif('A</td>
    </tr>
  </tbody>
</table>

Is this a bug in LimeSurvey and is there any way around this or to fix this?

Thanks!
The topic has been locked.
More
9 years 4 months ago #135826 by holch
Maybe not a solution for the exact problem, but why not do the calculations directly in Limesurvey and just send the result? At the end of the day you have the total calculation already in database saved, which is good should something go wrong with sending the emails, etc.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
9 years 4 months ago #135871 by Siem

holch wrote: Maybe not a solution for the exact problem, but why not do the calculations directly in Limesurvey and just send the result? At the end of the day you have the total calculation already in database saved, which is good should something go wrong with sending the emails, etc.


I tried this with a hidden equation question, but the same problem occurs.
I think the code is too long for the editor to save (maybe the database field used is too small).
The topic has been locked.
More
9 years 4 months ago #135876 by DenisChenu
Hi,

Did you try without HTML editor ?

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
9 years 4 months ago #135881 by Siem

DenisChenu wrote: Hi,

Did you try without HTML editor ?

Denis


Yes, I changed the "Use HTML format for token emails" to "No" and used the text-field to submit the my HTML / code.
After saving it is cut off at a certain point.
The topic has been locked.
More
9 years 4 months ago #135886 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
9 years 4 months ago #135889 by Siem

DenisChenu wrote: No, not the token email.

YOUR settings : www.limesurvey.org/manual/First_login_-_...er_preferences#Popup


Yes I tried it with these settings ("disabled the Filter HTML for XSS setting" and in "Source Code Mode").
The topic has been locked.
More
9 years 4 months ago #135907 by Mazi
Can you always reproduce this issue?

If so, please file a bug report at our bug tracker.

Best regards/Beste Grüße,
Dr. Marcel Minke
survey-consulting.com
offlinesurveys.com
Feel free to contact me by email for professional LimeSurvey support!
The topic has been locked.
More
9 years 4 months ago #135917 by tpartner

Yes I tried it with these settings ("disabled the Filter HTML for XSS setting" and in "Source Code Mode").

I think Denis means to try disabling the editor entirely:



Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
9 years 4 months ago #135923 by DenisChenu
Or Popup (direct link provided : we must update manual ;) )

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
9 years 4 days ago #141420 by tammo
Would it be possible to disable CKEditor & HTML completely, but for email only? In question text I do still want HTML...


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
9 years 4 days ago #141427 by jelo

tammo wrote: Would it be possible to disable CKEditor & HTML completely, but for email only?

I think a tab with html/plain which switches between the Editor and a simple form would work.

But is there a bugreport? The threads is months old. Did you run into an issue Tammo?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
9 years 4 days ago - 9 years 4 days ago #141428 by tammo
Hi Jelo, thanks for your respons. I am trying to send out a confirmation mail with a conditional text part at the end:

- - - -
Code:
Confirmation mail text (in HTML)
 
{if((pg12)=='N','<br/><br/>- - - -<br />Here I want to write some text and on the next line a link.<br />
<a href="https://www.toolsforresearch.com">Click here!</a><br /> - - - -',' ')}
- - - -
In HTML mail the the complete expression is sent out, not the calculated result of it. I tried 2.06, 2.50 and I am wondering what I am doing wrong.

Using inline editor, popup editor, all same result: expression is in the mail. When I switch to non-HTML mails, same result. Logged in as super admin.


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Last edit: 9 years 4 days ago by tammo.
The topic has been locked.
More
9 years 4 days ago #141434 by Mazi

jelo wrote: I think a tab with html/plain which switches between the Editor and a simple form would work.

Isn't that what the "pop-up" mode of the editor does? By default you see the source code view but can click the pencil icon to open the editor?!

Best regards/Beste Grüße,
Dr. Marcel Minke
survey-consulting.com
offlinesurveys.com
Feel free to contact me by email for professional LimeSurvey support!
The topic has been locked.
More
9 years 4 days ago - 9 years 4 days ago #141435 by Mazi
tammo,

1. Always use ....NAOK when referring to certain questions. It is a safer version if responses can be empty.

2. Did you check for syntax errors?

3. Try removing "(" and ")" around "pg12":
{if(pg12.NAOK=='N','<br/><br/>- - - -...

Best regards/Beste Grüße,
Dr. Marcel Minke
survey-consulting.com
offlinesurveys.com
Feel free to contact me by email for professional LimeSurvey support!
Last edit: 9 years 4 days ago by Mazi.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose