19 Replies Latest reply on Dec 16, 2015 7:23 AM by bschanck

    "More like this" hover problem

    jcassella

      We recently upgraded to Jive 6, and just noticed that when you hover over the links in the "more like this" section, the pop-up always shows this error:

       

      Screenshot - 10_11_2013 , 9_46_02 AM.png

       

       

       

      We filed a case for this, and were told it's a known issue with no fix yet.  I noticed that the Jive Community site doesn't have this problem (no hover at all), hoping someone at Jive would be willing to share the update they did (a theme change somewhere?) or anyone else that has already made a similar fix on their site.

       

      Thanks.

        • Re: "More like this" hover problem
          roguen

          Hi Jim,

          I've seen this from time to time in places, though I'm in so many Jive communities I can't recall exactly where. It did not last with a follow up mouse over though.  Are you consistently seeing it?

           

          If so, i would recommend that you create a case in your private Jive support group and let them help you further there: http://community.jivesoftware.com/support.jspa

          • Re: "More like this" hover problem
            gdinning

            I was just digging into this problem and noticed that others are seeing it as well (why don't I learn to check the community first?).  Here's what it looks like to me.

             

            On the client side (soy, JS) the concept of "container" seems to mean the document to which the relevant content is related.  On the server side Struts action, there is an attribute which is a JiveContainer that is being set to null.  This causes the action to "error out".  I think that the container info from the client is being used on the server side to look up an actual JiveContainer which fails since Documents aren't containers.

             

            Not really sure how to go about fixing this.  I'll probably try to find a way to disable it.

            1 person found this helpful
            • Re: "More like this" hover problem
              manish12nov

              Hi Jim Cassella, Gregory Dinning,

               

              We found a solution for the issue, it can be worked out by replacing the following line in morelikethis_view.js :

               

              var link = jive.shared.displayutil.containerDisplayNameLink({"container" : container});

              with :

              var link = jive.shared.displayutil.containerDisplayNameLink({"container" : container,"hideTooltip" : true});


              But, we will have to do it in overlay. Is there any alternates u found so we could avoid touching Overlay approach?

                • Re: "More like this" hover problem
                  gdinning

                  Can you redefine the containerDisplayNameLink Soy template in a plugin and overshadow the one in the WAR?  I don't think I've ever tried that so I'm not sure if it would work.  If you've already got an overlay, that might be simpler.  If you have a cleaner solution, I'd be interested in seeing it!

                • Re: "More like this" hover problem
                  manish12nov

                  Hey ,

                  I found the solution for this issue. Let me know if anyone still looking for the solution.

                  • Re: "More like this" hover problem
                    manish12nov

                    Hi Gregory Dinning & Jim Cassella,

                     

                    This resolves the issue :

                     

                    Replace the following ftl content in your theme :  /template/global/include/jive-search-macros.ftl

                     

                    Paste the following data in ftl :  (re-apply theme and refresh page).

                     

                     

                    <#macro moreLikeThis objectType objectID numResults=5>

                        <!-- BEGIN sidebar box 'More Like This' -->

                        <@resource.javascript file="/resources/scripts/apps/morelikethis/model/morelikethis_source.js"/>

                        <@resource.javascript file="/resources/scripts/apps/morelikethis/views/morelikethis_view.js"/>

                        <@resource.javascript file="/resources/scripts/apps/morelikethis/main.js"/>

                        <div class="j-box">

                            <header>

                                <h4 id="more-like-header-${objectType}-${objectID}"><@s.text name="mrlkthis.more_like_this.gtitle" /></h4>

                            </header>

                            <nav class="j-box-body" role="navigation" aria-labeledby="more-like-header-${objectType}-${objectID}">

                                    <div id="jive-more-like-this-${objectType?c}-${objectID?c}">

                                        <p><@s.text name="mrlkthis.retrieve_data.text" /></p>

                                    </div>

                            </nav>

                        </div>

                     

                     

                        <@resource.javascript>

                     

                     

                    /**

                    * jive.MoreLikeThisAppNew.Main

                    *

                    * JavaScript code to handle more like this results

                    *

                    * This is the main entry point of the MoreLikeThisAppNew.  This class acts as a

                    * controller.  It instantiates a model layer in the form of

                    * jive.MoreLikeThisAppNew.MoreLikeThisSource and a view layer as

                    * jive.MoreLikeThisAppNew.MoreLikeThisView.

                    *

                    * This class has no public methods.

                    */

                     

                     

                    /*extern jive $j jiveToggleTab */

                     

                     

                    jive.namespace("MoreLikeThisAppNew");

                     

                     

                    jive.MoreLikeThisAppNew.Main = function(options) {

                        var objectType  = options.objectType,

                            objectID    = options.objectID,

                            containerID = options.containerID,

                            numResults  = options.numResults || 5,

                            moreLikeThisView,

                            moreLikeThisSource;

                        function renderResults() {

                            moreLikeThisSource.getMoreLike(objectType, objectID, numResults, {

                                success: function(data) {

                                    moreLikeThisView.setContent(data);

                                },

                                error: function () {

                                    moreLikeThisView.displayError();

                                }

                            });

                        }

                     

                     

                        /* *** Initialization *** */

                        moreLikeThisView = new jive.MoreLikeThisAppNew.MoreLikeThisView(containerID,

                            { noContentMessage: options.noContentMessage, errorMessage: options.errorMessage });

                     

                     

                        moreLikeThisSource = new jive.MoreLikeThisApp.MoreLikeThisSource();

                     

                     

                        $j(document).ready(function() {

                            renderResults();

                        });

                    };

                     

                     

                    /**

                    * jive.MoreLikeThisAppNew.MoreLikeThisView

                    *

                    * Handles rendering of results from a 'more like this' call into the page

                    * by creating <li> elements in the <ul> container specified by the given

                    * containerID

                    *

                    * To use create an instance of MoreLikeThisView and pass in the id of the

                    * <ul> element in the page in which elements will be rendered.  Also, an

                    * appropriate message for displaying when there are no results found should

                    * be provided in the options as "noContentMessage"

                    *

                    * @depends template=jive.shared.displayutil.containerDisplayNameLink

                    */

                     

                     

                    /*extern jive $j */

                     

                     

                    jive.namespace("MoreLikeThisAppNew");

                     

                     

                    jive.MoreLikeThisAppNew.MoreLikeThisView = function(containerID, options) {

                        var noContentMessage    = options.noContentMessage,

                            errorMessage        = options.errorMessage,

                            containerSelector   = "#" + containerID;

                     

                     

                        /**

                         * setContent(data)

                         * - data (JSON list): list of results describing related objects to be rendered into

                         *     the page.  Each entry should have an objectURL, objectClass and subject text

                         *

                         * Renders the given results into the page inside the <ul> element this object is

                         * configured to use.  If there are no results, the configured no content message

                         * will be rendered into the container.

                         */

                        function setContent(data) {

                            var elements = '';

                            if (data.length > 0) {

                                elements += "<ul class=\"j-icon-list\">";

                                data.forEach(function(result) {

                                    var container = {

                                        "jiveObjectURL": result.objectURL,

                                        "id": result.ID,

                                        "type": result.objectType,

                                        "name": "<span class=\"" + result.objectClass + "\"></span>" + result.subject

                                    };

                                    var link = jive.shared.displayutil.containerDisplayNameLink({"container" : container,"hideTooltip" : true});

                                    elements += "<li>" + link + "</li>";

                     

                     

                                });

                                elements +="</ul>";

                            }

                            else {

                                elements = "<p>" + noContentMessage + "</p>";

                            }

                     

                     

                            $j(containerSelector).empty().append(elements);

                        }

                     

                        function displayError() {

                            $j(containerSelector).empty().append("<p>" + errorMessage + "</p>");

                        }

                     

                     

                        this.setContent     = setContent;

                        this.displayError   = displayError;

                    };

                     

                     

                     

                     

                            new jive.MoreLikeThisAppNew.Main({

                                objectType: ${objectType?c},

                                objectID: ${objectID?c},

                                containerID: "jive-more-like-this-${objectType?c}-${objectID?c}",

                                numResults: 5,

                                noContentMessage: "<@s.text name="mrlkthis.no_content.text" />",

                                errorMessage: "<@s.text name="mrlkthis.cant_get_content.text" />"

                            });

                        </@resource.javascript>

                        <!-- END sidebar box 'More Like This' -->

                    </#macro>