Bug 970822 - Injects are not rendered in the doc preview.
Injects are not rendered in the doc preview.
Status: CLOSED CURRENTRELEASE
Product: PressGang CCMS
Classification: Community
Component: Web-UI (Show other bugs)
1.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 1.2
Assigned To: Lee Newson
:
: 971233 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-04 22:06 EDT by Jared MORGAN
Modified: 2015-08-09 21:23 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-07 21:05:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Lee Newson 2013-06-05 00:23:18 EDT
Firstly your syntax is incorrect for the injection, it should be <!-- Inject: <ID> --> (note the missing colon), so if that was correct then it would appear on the Docbuilder. However it would not appear on the live preview so I'm gonna edit the title to match that (also made your comment private since it has internal links).
Comment 2 Lee Newson 2013-06-06 00:36:57 EDT
*** Bug 971233 has been marked as a duplicate of this bug. ***
Comment 3 Lee Newson 2013-09-17 03:33:48 EDT
I've implemented a first pass at this in Build 201309171700.

Currently the injections aren't resolved fully and will only display the topic ID instead of the topic title (and the links are useless). It is done this way as it would be too slow to have to fetch each topics information and provide the rendering in a reasonable time frame. To do a full rendering we'd have to asynchronously load and replace the content, in the same way that images are loaded.

As an example see topic 3676 on the test server.
Comment 5 Jared MORGAN 2013-09-17 18:35:56 EDT
Yep, I corrected the injects at the time (as per an IRC with you) and they then rendered in the published doc.

This extra level of functionality in the test topic is actually pretty good. This way, displaying the injects like this shows you that you have structured them correctly. 

Early on, I was making the mistake with injects you detected in Comment#1 because I wasn't getting any feedback from the system that the syntax was incorrect. If new users know that they should see an in-line render of the referenced topic, that is a great visual key for them to know they've "done it right".

For now, I think this solution is fine.
Comment 6 Lee Newson 2013-09-17 19:23:36 EDT
Really the XML validation that is done should also check for any incorrect injection references, however we have BZ#997681 open to fix that issue.

I've also made another minor change to the initial pass. The links that are injected will now link to the editor for the injected topic.
Comment 7 Lee Newson 2013-11-07 21:05:19 EST
I'm going to mark this as complete since it was released as part of 1.2 and if we want the titles instead of just the ids then a new bug/RFE should be opened.

Note You need to log in before you can comment on or make changes to this bug.