CJW Newsletter long line problem

Author Message

Nicklas Lundgren

Tuesday 15 March 2011 3:33:51 am

Hi folks,

I am running the great CJW Newsletter in a few sites, with really good results. However, now I have run into a problem.

So - I am curious if anyone else has had the same trouble, and possibly has a solution.

The problem is that in html output format, everything created in the editor is sent without any line breaks.

That is, all the html content generated by attribute_view_gui is generated as one loooong line of html code.

This works out fine in previews, as a web browser doesnt care.

However - Sendmail obviously has a limit to the line length in emails, and puts an exclamation mark (!) followed by a line break when the line reaches the limit.

This breaks the newsletter text flow, and we get unpredicatable results when sending.

I would appreciate any suggestions on this matter.

Cheers,

Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Donat Fritschy

Tuesday 15 March 2011 9:52:14 am

Hi Nicklas

thanks for the feedback. You are most probably right about the limitation, as this thread shows. We will certainly look into it.

Regards,
Donat

http://www.cjw-network.com

http://www.webmanufaktur.ch - Developers united in eZ Publish: http://www.cjw-network.com

Nicklas Lundgren

Tuesday 15 March 2011 12:36:52 pm

Hi Donat,

Interesting thread you referred to! So I guess the solution lies in limiting the line lenght somehow...

Looking forward to any ideas on how to handle this issue.

Best regards,

Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Felix Woldt

Wednesday 16 March 2011 2:34:13 am

Hi Nicklas,

yes this is an interesting topic.

For a short workaround, we could extend the |cjw_newsletter_str_replace( ..., ...) operator in the skin html.tpl.

"
cjw_newsletter_str_replace( array( '<p>' ), array( '\n<p>) )
"

which is adding a linebreak before every p tag.

I final solution would be to automatically wrap the lines in html and text mode.

Can you give me feedback if the workaroud is working for you?

Thank's Felix

http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com

CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter

Nicklas Lundgren

Monday 28 March 2011 12:26:57 pm

Hi Felix,

Sorry for the delay with my reply.

I found out that I first of all needed to upgrade to RC1 from Beta. It took a while, but now I am happy to say that your suggestion above did help!

With that solution, every paragraph renders on separate lines. That should be good enough in most cases. I cant imagine anyone writing one paragraph longer than 1000 characters...

So - thanks for great assistance.

And while I am at it... I think I have found another problem. Maybe it should be in a new thread, but I start here:

Have you tried to embed a file (pdf or alike) in a newsletter edition? I notice that the pdf-icon dont show up. And I see why - it renders with a relative URL, which of course is useless in an email.

Maybe you have a solution to this problem as well, before I start digging into templates...

Thanks for good help!

Cheers,

/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 17 2025 23:50:39
Script start
Timing: Jan 17 2025 23:50:39
Module start 'layout'
Timing: Jan 17 2025 23:50:39
Module start 'content'
Timing: Jan 17 2025 23:50:40
Module end 'content'
Timing: Jan 17 2025 23:50:40
Script end

Main resources:

Total runtime1.1626 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.3516152.6250
Module start 'layout' 0.00570.0028 741.976639.4688
Module start 'content' 0.00851.1527 781.4453619.3984
Module end 'content' 1.16120.0014 1,400.843816.1563
Script end 1.1625  1,417.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2794160.0002
Check MTime0.00130.1117160.0001
Mysql Total
Database connection0.00060.049010.0006
Mysqli_queries1.089293.6930660.0165
Looping result0.00070.0603640.0000
Template Total1.134697.620.5673
Template load0.00210.180520.0010
Template processing1.132597.413020.5662
Template load and register function0.00010.011410.0001
states
state_id_array0.00110.093410.0011
state_identifier_array0.00110.096420.0006
Override
Cache load0.00190.1618540.0000
Sytem overhead
Fetch class attribute can translate value0.00060.052230.0002
Fetch class attribute name0.00210.181680.0003
XML
Image XML parsing0.00150.130830.0005
class_abstraction
Instantiating content class attribute0.00000.0021100.0000
General
dbfile0.00110.0979290.0000
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs