Forums / Extensions / CJW Newsletter long line problem

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

eZ debug

Timing: Jan 17 2025 21:14:45
Script start
Timing: Jan 17 2025 21:14:45
Module start 'content'
Timing: Jan 17 2025 21:14:46
Module end 'content'
Timing: Jan 17 2025 21:14:46
Script end

Main resources:

Total runtime0.7539 sec
Peak memory usage4,096.0000 KB
Database Queries203

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 596.0703180.8359
Module start 'content' 0.00550.6503 776.9063664.1250
Module end 'content' 0.65590.0979 1,441.0313341.6016
Script end 0.7538  1,782.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4925210.0002
Check MTime0.00140.1872210.0001
Mysql Total
Database connection0.00080.112210.0008
Mysqli_queries0.664388.11812030.0033
Looping result0.00170.22792010.0000
Template Total0.731397.020.3657
Template load0.00170.221020.0008
Template processing0.729796.789920.3648
Template load and register function0.00010.013910.0001
states
state_id_array0.00030.039010.0003
state_identifier_array0.00060.078420.0003
Override
Cache load0.00150.2021540.0000
Sytem overhead
Fetch class attribute can translate value0.00120.154340.0003
Fetch class attribute name0.00120.162280.0002
XML
Image XML parsing0.00680.906840.0017
class_abstraction
Instantiating content class attribute0.00000.0021100.0000
General
dbfile0.00320.4281400.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 9

Time used to render debug report: 0.0002 secs