Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Tag mentions doesn't work with slugs of 3 characters or less #4124

Open
luceos opened this issue Nov 22, 2024 · 1 comment
Open

[1.x] Tag mentions doesn't work with slugs of 3 characters or less #4124

luceos opened this issue Nov 22, 2024 · 1 comment
Labels

Comments

@luceos
Copy link
Member

luceos commented Nov 22, 2024

Current Behavior

When you try to mention the tag faq, javascript errors.

image
image

This error does not happen on 2.x

Steps to Reproduce

  1. open a composer on discuss.flarum.org
  2. tag mention the tag faq
  3. rendering in preview halts and js error thrown

Expected Behavior

Properly continues.

Screenshots

No response

Environment

See flarum info output

Output of php flarum info

Flarum core: 1.8.9
PHP version: 8.2.18
MySQL version: 10.11.9-MariaDB-ubu2204
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, intl, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+---------------------------------+--------------+--------+
| Flarum Extensions               |              |        |
+---------------------------------+--------------+--------+
| ID                              | Version      | Commit |
+---------------------------------+--------------+--------+
| flarum-flags                    | dev-main     |        |
| flarum-tags                     | dev-main     |        |
| flarum-approval                 | dev-main     |        |
| flarum-gdpr                     | 1.0.0-beta.3 |        |
| flarum-suspend                  | dev-main     |        |
| flarum-mentions                 | dev-main     |        |
| flarum-subscriptions            | dev-main     |        |
| fof-username-request            | 1.2.4        |        |
| fof-user-bio                    | 1.4.2        |        |
| fof-split                       | 1.1.1        |        |
| fof-merge-discussions           | 1.4.1        |        |
| flarum-sticky                   | dev-main     |        |
| flarum-lock                     | dev-main     |        |
| blomstra-turnstile              | 0.1.6        |        |
| fof-byobu                       | 1.3.8        |        |
| fof-follow-tags                 | 1.2.7        |        |
| fof-gamification                | 1.6.8        |        |
| luceos-dofollow                 | v1.0         |        |
| kilowhat-audit-pro              | 1.7.1        |        |
| ianm-twofactor                  | 1.1.3        |        |
| fof-sentry                      | 1.3.2        |        |
| fof-prevent-necrobumping        | 1.1.2        |        |
| fof-pages                       | 1.0.8        |        |
| fof-oauth                       | 1.6.14       |        |
| fof-nightmode                   | 1.6.0        |        |
| fof-moderator-notes             | 1.3.0        |        |
| fof-links                       | 1.3.0        |        |
| fof-ignore-users                | 1.2.1        |        |
| fof-github-autolink             | 1.1.4        |        |
| fof-geoip                       | 1.5.0        |        |
| fof-formatting                  | 1.0.3        |        |
| fof-drafts                      | 1.2.12       |        |
| fof-disposable-emails           | 1.0.0        |        |
| fof-best-answer                 | 1.6.0        |        |
| fof-anti-spam                   | 1.1.2        |        |
| fof-analytics                   | 1.1.0        |        |
| flarum-statistics               | dev-main     |        |
| flarum-markdown                 | dev-main     |        |
| flarum-likes                    | dev-main     |        |
| flarum-lang-english             | dev-main     |        |
| flarum-emoji                    | dev-main     |        |
| flarum-bbcode                   | dev-main     |        |
| blomstra-spam-prevention        | 1.7.0        |        |
| blomstra-sendgrid               | 1.0-beta.4   |        |
| blomstra-realtime               | 0.3.2        |        |
| blomstra-payments               | 0.5.19       |        |
| blomstra-fontawesome            | 0.1.5        |        |
| blomstra-cache-assets           | 0.5          |        |
| askvortsov-moderator-warnings   | v0.6.3       |        |
| askvortsov-discussion-templates | v0.8.3       |        |
+---------------------------------+--------------+--------+
Base URL: https://discuss.flarum.org
Installation path: /var/www/discuss.flarum.org
Queue driver: redis
Session driver: redis (Code override. Configured to file)
Scheduler status: Active
Mail driver: sendgrid
Debug mode: off

Possible Solution

No response

Additional Context

No response

@DavideIadeluca
Copy link
Contributor

Had a look at this, and I'm only able to reproduce it on discuss itself. Mentioning tags with slugs of 3 chars or fewer works on https://demo.flarum.site/ so it appears the issue originates in a third-party extension rather than in the framework itself.

I also tried to run all extensions from your output (except blomstra/payments) and it still worked. So either it's payments or a certain extension config. Can you try to disable payments for a second to rule out it's not that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants