I'm not sure when this started to happen and if it's related to 1.8.7, however the search results are really weird with posts shown in raw format:

Might be an extension though, since I don't see this bug here on Discuss. Any ideas? Feel free to split into a separate discussion if you think it's not related to 1.8.7.

Flarum core: 1.8.7
PHP version: 8.2.24
MySQL version: 8.0.36-28
Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, enchant, hash, fileinfo, filter, ftp, gd, gettext, gmp, json, iconv, SPL, intl, session, mbstring, standard, mysqlnd, pcntl, exif, mysqli, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, random, readline, Reflection, imap, shmop, SimpleXML, soap, sockets, sodium, sysvmsg, sysvsem, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, memcached, Zend OPcache
+-------------------------------------------+---------+--------+
| Flarum Extensions                         |         |        |
+-------------------------------------------+---------+--------+
| ID                                        | Version | Commit |
+-------------------------------------------+---------+--------+
| flarum-flags                              | v1.8.1  |        |
| flarum-approval                           | v1.8.2  |        |
| flarum-tags                               | v1.8.2  |        |
| flarum-suspend                            | v1.8.2  |        |
| flarum-bbcode                             | v1.8.0  |        |
| fof-pages                                 | 1.0.8   |        |
| fof-byobu                                 | 1.3.6   |        |
| flarum-mentions                           | v1.8.4  |        |
| flarum-subscriptions                      | v1.8.1  |        |
| afrux-forum-widgets-core                  | v0.1.7  |        |
| flamarkt-backoffice                       | 0.1.4   |        |
| flarum-markdown                           | v1.8.1  |        |
| zerosonesfun-inline-audio                 | 3.0     |        |
| v17development-seo                        | v1.8.1  |        |
| sycho-move-posts                          | v0.1.7  |        |
| rob006-last-post-avatar                   | 1.2.4   |        |
| kilowhat-rich-embeds                      | 1.3.1   |        |
| fof-user-directory                        | 1.3.3   |        |
| fof-user-bio                              | 1.4.0   |        |
| fof-upload                                | 1.5.5   |        |
| fof-sitemap                               | 2.2.1   |        |
| fof-polls                                 | 2.2.7   |        |
| fof-nightmode                             | 1.5.3   |        |
| fof-merge-discussions                     | 1.4.1   |        |
| fof-links                                 | 1.2.3   |        |
| fof-ignore-users                          | 1.2.1   |        |
| fof-forum-statistics-widget               | 1.2.1   |        |
| fof-formatting                            | 1.0.3   |        |
| fof-follow-tags                           | 1.2.6   |        |
| fof-ban-ips                               | 1.1.1   |        |
| fof-anti-spam                             | 1.1.2   |        |
| flarum-sticky                             | v1.8.1  |        |
| flarum-statistics                         | v1.8.1  |        |
| flarum-pusher                             | v1.8.1  |        |
| flarum-nicknames                          | v1.8.1  |        |
| flarum-lock                               | v1.8.1  |        |
| flarum-likes                              | v1.8.1  |        |
| flarum-lang-english                       | v1.8.0  |        |
| flarum-emoji                              | v1.8.1  |        |
| ekumanov-online-users-widget              | v1.0.7  |        |
| davwheat-session-keepalive                | 1.1.0   |        |
| clarkwinkelmann-selective-mediaembed      | 1.0.1   |        |
| clarkwinkelmann-post-stream-search        | 1.1.0   |        |
| clarkwinkelmann-advanced-search-highlight | 1.0.2   |        |
| blomstra-turnstile                        | 0.1.4   |        |
| blomstra-spam-prevention                  | 1.7.0   |        |
| blomstra-mark-unread                      | 0.2.0   |        |
| blomstra-database-queue                   | 1.1.0   |        |
| askvortsov-rich-text                      | v2.1.7  |        |
| askvortsov-pwa                            | v3.4.1  |        |
| askvortsov-markdown-tables                | v1.2.1  |        |
+-------------------------------------------+---------+--------+
Base URL: https://myforum.com/forum
Installation path: /home/customer/www/myforum.com/public_html/forum
Queue driver: database
Session driver: file
Scheduler status: Active
Mail driver: smtp
Debug mode: off

    CyberGene try disabling Advanced Search Highlight. The results will look different in any case, but the question is whether it breaks Flarum default highlighting or just my extension.

    And if there is a problem with my extension, could you send me the raw text of your post? I have a difficult time guessing whether the "mark" keywords are all from the broken HTML or if you actually have that word in the text. Maybe there's a problem specifically with that keyword.

      clarkwinkelmann
      FYR, Advanced Search Highlight doesn't cause any issues in my Flarum core: 1.8.7; the output results are normal.
      However, I just noticed that in the item-excerpt, the <mark></mark> seems to be duplicated:
      <li class="item-excerpt">
      <mark><mark>turbo</mark></mark>
      </li>

      clarkwinkelmann try disabling Advanced Search Highlight.

      That did the trick! Disabling it fixed it.

      clarkwinkelmann And if there is a problem with my extension, could you send me the raw text of your post? I have a difficult time guessing whether the "mark" keywords are all from the broken HTML or if you actually have that word in the text. Maybe there's a problem specifically with that keyword.

      Let me get to a computer, so that I extract the raw post content from the DB, if that’s what you ask for? However, I tested with many search words and all search results look that weird and some of them are really huge whereas they should be just a small extract from the original post.

      To clarify: my issue is when using the regular search in the entire forum and when I click on “search all discussions for…”. I don’t have any issues when searching within a single discussion through the Post Stream Search extension.

      Here's the raw (HTML) content from the first search result from the screenshot I posted earlier.

      First, the discussion title in that result is messed up, it doesn't contain any <mark> tags:
      Garritan CFX vs. Kontakt-based instruments

      Then, the post content is:
      <p><a href=\"https://pianoclack.com/forum/u/MacMacMac\" class=\"UserMention\" rel=\"\" target=\"\">@MacMacMac</a> You might check out some popular tweaks of Garritan CFX. For example:</p>\n\n<p>CyberGene pedaling mod<br>\n<a class=\"inline-url\" href=\"https://pianoclack.com/forum/d/710-improve-garritan-cfx-repedaling-behavior\" rel=\"ugc noopener\" target=\"_self\" rel=\"ugc noopener\" target=\"_self\">https://pianoclack.com/forum/d/710-improve-garritan-cfx-repedaling-behavior</a></p>\n\n<p>Noise \"fix\" and other typical tweaks<br>\n<a class=\"inline-url\" href=\"https://forum.pianoworld.com/ubbthreads.php/topics/3116199/garritan-cfx-hiss-fix.html\" rel=\"ugc noopener nofollow\" target=\"_blank\" rel=\"ugc noopener nofollow\" target=\"_blank\">https://forum.pianoworld.com/ubbthreads.php/topics/3116199/garritan-cfx-hiss-fix.html</a></p>\n\n<p>Fix for audio dropouts when pedaling<br>\n<a class=\"inline-url\" href=\"https://forum.pianoworld.com/ubbthreads.php/topics/3115274/pedal-noise-fix-for-garritan-cfx.html\" rel=\"ugc noopener nofollow\" target=\"_blank\" rel=\"ugc noopener nofollow\" target=\"_blank\">https://forum.pianoworld.com/ubbthreads.php/topics/3115274/pedal-noise-fix-for-garritan-cfx.html</a></p>\n\n<p>Note repetition tweak<br>\n<a class=\"inline-url\" href=\"https://forum.pianoworld.com/ubbthreads.php/topics/2758621/solution-to-garritan-cfxs-unconvincing-note-repetition.html\" rel=\"ugc noopener nofollow\" target=\"_blank\" rel=\"ugc noopener nofollow\" target=\"_blank\">https://forum.pianoworld.com/ubbthreads.php/topics/2758621/solution-to-garritan-cfxs-unconvincing-note-repetition.html</a></p>\n<hr>\n\n<p>Example settings of Gamma1734 (not sure if he has updated settings)<br>\n<a class=\"inline-url\" href=\"https://forum.pianoworld.com/ubbthreads.php/topics/3127127/re-wow-22-piano-vsts-reviewed-by-gamma1734.html#Post3127127\" rel=\"ugc noopener nofollow\" target=\"_blank\" rel=\"ugc noopener nofollow\" target=\"_blank\">https://forum.pianoworld.com/ubbthreads.php/topics/3127127/re-wow-22-piano-vsts-reviewed-by-gamma1734.html#Post3127127</a></p>\n\n<p>Example settings of Philip Johnston (I think he ussed Yamaha internal sounds for live playing and these are for rendering the audio in production but not 100% sure. Regardless, he has been using VSL recently)<br>\n<a class=\"inline-url\" href=\"https://forum.pianoworld.com/ubbthreads.php/topics/3235746/re-garritan-cfx-repedalling-demo-real-enough-series.html#Post3235746\" rel=\"ugc noopener nofollow\" target=\"_blank\" rel=\"ugc noopener nofollow\" target=\"_blank\">https://forum.pianoworld.com/ubbthreads.php/topics/3235746/re-garritan-cfx-repedalling-demo-real-enough-series.html#Post3235746</a></p>\n\n<p>Example settings of Rach3Master<br>\n<a class=\"inline-url\" href=\"https://forum.pianoworld.com/ubbthreads.php/galleries/2700015/garritan-cfx-concert-grand-full-settings.html\" rel=\"ugc noopener nofollow\" target=\"_blank\" rel=\"ugc noopener nofollow\" target=\"_blank\">https://forum.pianoworld.com/ubbthreads.php/galleries/2700015/garritan-cfx-concert-grand-full-settings.html</a></p>

        CyberGene thanks, I'll see whether I can figure out anything from that. If you are able to try disabling other extensions (while re-enabling Advanced Search Highlight) to check if any might be responsible for the conflict this could be helpful.

        While I suggest and combine Advanced Search Highlight with the post filtering, it applies the advanced highlighting in a few other places, including the detailed discussion search results. It's useful to know that the problem is only on the discussion list.

          clarkwinkelmann If you are able to try disabling other extensions (while re-enabling Advanced Search Highlight) to check if any might be responsible for the conflict this could be helpful.

          I just tried disabling the extensions one by one but the issue was always present. I don't believe it's a conflict with another extensions.

          • IanM replied to this.
            11 days later

            CyberGene please update to Flarum/core 1.8.8 which was just released. I’ll be announcing it in a moment but I saw your post first 🙂

              IanM thanks, I updated. But I think my issue is different and is caused by the Advanced Search Highlight extension. Clark is aware of it. I’m not sure if he could reproduce it though. He suspected another extension might be involved but I couldn’t isolate which one, stopped them one by one but none made an effect.

              2 months later

              @clarkwinkelmann have you had any chance to look at this issue? I tried disabling extensions one by one but none helped. Except of course for Advanced Search Highlight which is the cause but you assumed it’s another extension affecting it.