We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    Hi just updated from modx 0.9.6.3 to the latest evolution 1.0 release.

    Now I have no search highlighting, but the option to remove the highlighting is still there???

    Can someone please help and have a look, any fixes for this please?

    http://www.insideyork.co.uk

    try searching for "ghosts" and click on a result, nothing is highlighted but the remove option is at the top??
      • 5811
      • 1,717 Posts
      The highlighting runs but the css styles are not found ...

      When I search "region" and follow the link to the "Ghost stories", I found the term "region" properly surrounded by the appropriate css tags:
      the area degenerated in <span class="ajaxSearch_highlight ajaxSearch_highlight1">region</span> of slums and warehouses.
      but I don’t find the class definitions of the css styles : ajaxSearch_highlight ajaxSearch_highlight1

      Are these styles always defined in your css files ?

      I have run several tests with the highlight plugin. The only one issue registered for the moment is described on this post.
      This issue is now registered as as AJAXSEARCH-38
        • 34162
        • 1 Posts
        hi thanks for the reply, do i need to change the name of the Search_highlight in the css to match the new name of the updated version, or is it called the same as it used to be? could this be the cause?? thanks for any help...
          • 5811
          • 1,717 Posts
          The Css class names haven’t change with the delivery of the version 1.8.3 (provided with MODx1.0.0)

          So somewhere in your css file you need to have something like:
          .AS_ajax_highlight1, .ajaxSearch_highlight1{
            color : #CC0000;
            padding: 0;
            font-weight: bold;
          }
          .AS_ajax_highlight2, .ajaxSearch_highlight2{
            color : #CB53DF;
            padding: 0;
            font-weight: bold;
          }
          to see the searchwords highlighted.
            • 34162
            • 1 Posts
            well this is what i have in my css:

            /* Search Terms Highlighting
            ------------------------------------------------------------------------------- */
            .AS_ajax_highlight {
            background-color: #ffb;
            padding: 2px;
            margin: -3px;
            border: 1px solid #dd3;
            color: #000;
            }

            .searchTerms { color: #eee; }
            .searchTerms .AS_ajax_highlight { margin: 0 0 0 3px;}
            a.ajaxSearch_removeHighlight, a.ajaxSearch_removeHighlight:visited { display: block; float: left; margin: 6px 0 0; padding: 1px 2px 2px; color: #888; }
            a.ajaxSearch_removeHighlight:hover { background-color: #888; color: #222; }

            is this wrong?
              • 5811
              • 1,717 Posts
              .AS_ajax_highlight1 {
                • 34162
                • 1 Posts
                i tried adding the 1 in in two places in that section but it still won’t work...
                  • 34162
                  • 1 Posts
                  can anyone please tell me what i’m doing wrong? thanks
                    • 5811
                    • 1,717 Posts
                    I did a mistake, use
                    .ajaxSearch_highlight1{
                      color : #CC0000;
                      padding: 0;
                      font-weight: bold;
                    }
                    .ajaxSearch_highlight2{
                      color : #CB53DF;
                      padding: 0;
                      font-weight: bold;
                    }
                    rather tha .AS_ajax_highlight1, .AS_ajax_highlight2

                    To understand which class should be added look at the code of the page highlighted.
                    For instance, search "basic", go to the page "W. Hamond Whitby Jet, The Shambles, York". Edit the code of the html page and search "basic".
                    The html code is:
                    This is a free <span class="ajaxSearch_highlight ajaxSearch_highlight1">Basic</span> listing on Inside York.
                    
                    So you need to define the classes: ajaxSearch_highlight ajaxSearch_highlight1 to highlight the word found.