[ForumUX] Forum post e-mail notifications should not be output with tiki markup

VERIFIED FIXED in 1.3

Status

P1
normal
VERIFIED FIXED
11 years ago
9 years ago

People

(Reporter: jason.barnabe, Assigned: paulc)

Tracking

unspecified

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: tiki_test)

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
The notification for this post[1] has this as the message:

---
Both ((Firefox cannot load web sites but other programs can)) and ((Error loading web sites)) have a link at the top to the other article.
Repeating data in both article is not necessary and also gives problems if data changes or new suggestions need to be added.

You can also look at this article: [http://kb.mozillazine.org/Error_loading_websites|Error_loading_websites (MozillaZine KB)]
---

which is the exact text that the user entered. We should convert the tiki markup that the user entered into plain text, for example:

---
Both Firefox cannot load web sites but other programs can <http://support.mozilla.com/kb/Firefox+cannot+load+web+sites+but+other+programs+can> and Error loading web sites <http://support.mozilla.com/kb/Error+loading+web+sites> have a link at the top to the other article.
Repeating data in both article is not necessary and also gives problems if data changes or new suggestions need to be added.

You can also look at this article: Error loading websites <http://kb.mozillazine.org#Error_loading_websites>"
---

[1] - http://support.mozilla.com/tiki-view_forum_thread.php?forumId=1&comments_parentId=1807#threadId1984
(Reporter)

Updated

10 years ago
Target Milestone: --- → 0.7

Comment 1

10 years ago
Setting P1 on bugs that are "must haves" for 0.7. This bug should be targeted to 0.6.3 or 0.6.4, or kept in 0.7 which will be the last milestone for Q3.
Priority: -- → P1

Updated

10 years ago
Assignee: nobody → nelson

Updated

10 years ago
Assignee: nelson → lorchard

Updated

10 years ago
Target Milestone: 0.7 → 0.8

Updated

10 years ago
Target Milestone: 0.8 → 0.9

Updated

10 years ago
Target Milestone: 0.9 → 1.1

Comment 2

10 years ago
les -- this one was pushed back to 1.1 because it was deemed not critical; however, the code freeze for that milestone is rapidly creeping up (24th March). 

do you still plan to fix this?
I haven't had a chance to look at this, and probably won't very soon.

Updated

10 years ago
Target Milestone: 1.1 → Future

Updated

10 years ago
Duplicate of this bug: 481147

Comment 5

10 years ago
This will be a bug for the forum UX improvement milestone in Q3, putting in 1.4 for now.
Assignee: lorchard → nobody
Target Milestone: Future → 1.4
(Assignee)

Updated

9 years ago
Assignee: nobody → paul.craciunoiu
(Assignee)

Updated

9 years ago
Summary: Forum post e-mail notifications should not be output with tiki markup → [ForumUX] Forum post e-mail notifications should not be output with tiki markup
(Assignee)

Comment 6

9 years ago
So I could either 
(1) parse the data through tiki, which will output HTML, or 
(2) we can discuss building a parser that converts wiki => email plain text markup

If the links are the major problem, it may not be too much work to go for (2).

Sylvie, is there anything on this in the latest Tiki? Thanks!
(Assignee)

Comment 7

9 years ago
As per a discussion with Cheng, we will need the list of things we want to format in the email, and then we can build/find a parser.

Eric, Laura: know of anything like this that we could use?

Comment 8

9 years ago
Top priority is formatting links and expanding content blocks.

Next priority is removing {DIV} marking for buttons etc or formatting them

Lowest priority is stuff like bold and italics.

Comment 9

9 years ago
Why not add the smarty block lib/smarty_tiki/block.wiki.php (not sure it exists in your version) and add a param to do a a strip_tags or an html2text
The desired end output is plain text, so no real re-formatting to do, just:
1. link conversion - use existing tiki code for this (I assume there is a function that does this anyway)
2. tag stripping - regex, easy
(Assignee)

Comment 11

9 years ago
Created attachment 387701 [details] [diff] [review]
patch, v1

How's this? Testing on the example post looks good.
Attachment #387701 - Flags: review?(laura)
Comment on attachment 387701 [details] [diff] [review]
patch, v1

WFM
Attachment #387701 - Flags: review?(laura) → review+
(Assignee)

Comment 13

9 years ago
r48712 / r48713
This needs a good deal of QA, it's important to make sure forum emails don't break.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Comment 14

9 years ago
Oops. I didn't realize it's a 1.4 :(
(Assignee)

Updated

9 years ago
Target Milestone: 1.4 → 1.3

Updated

9 years ago
Whiteboard: tiki_bug
I really doubt this patch works, or makes any changes for that matter. The forum_outbound template it applies to is used by a (legacy) feature in tiki that is not used in SUMO (outbound_address is empty for all forums).

The actual notification sent as watches is further down that function and left unmodified.
Whiteboard: tiki_bug → tiki_bug, tiki_discuss
Somehow, we aren't seeing the wiki markup in e-mail notifications. Paul: Do you know if there was anything else along those lines? I find it hard to believe this would have gotten an r+ if it didn't fix anything.
(Assignee)

Comment 18

9 years ago
I'm pretty sure the patch fixes the problem in the bug. I.e. these two lines:
$data = $tikilib->parse_data($data, 0);
$mail_data = nl2br(strip_tags($smarty->fetch("mail/forum_outbound.tpl"), '<a>'));
Make sure that $data does not contain wiki markup and then strip out the html.
The problem is that it's applied to mail/forum_outbound.tpl rather than mail/forum_post_notification.tpl, which is the one used and customized for SUMO.

The patch may be good, but it's not applied at the right place, and not tested for that reason.
Let's see what happens on tiki-trunk.m.c and go from there. -> tiki_test
Whiteboard: tiki_bug, tiki_discuss → tiki_test
You need to log in before you can comment on or make changes to this bug.