Closed Bug 409904 Opened 17 years ago Closed 15 years ago

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

Categories

(support.mozilla.org :: Forum, task, P1)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jason.barnabe, Assigned: paulc)

References

Details

(Whiteboard: tiki_test)

Attachments

(1 file)

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
Target Milestone: --- → 0.7
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
Assignee: nobody → nelson
Assignee: nelson → lorchard
Target Milestone: 0.7 → 0.8
Target Milestone: 0.8 → 0.9
Target Milestone: 0.9 → 1.1
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.
Target Milestone: 1.1 → Future
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: nobody → paul.craciunoiu
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
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!
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?
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.
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
Attached patch patch, v1Splinter Review
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+
r48712 / r48713 This needs a good deal of QA, it's important to make sure forum emails don't break.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Oops. I didn't realize it's a 1.4 :(
Target Milestone: 1.4 → 1.3
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.
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.

Attachment

General

Created:
Updated:
Size: