flarum / issue-archive

0 stars 0 forks source link

IPv6 URL causes "Error `Template parameter names *must* be separated`" for all user activities #118

Open vikulin opened 3 years ago

vikulin commented 3 years ago

Bug Report

Current Behavior IPv6 URL causes "Error Template parameter names *must* be separated" error for all user activities. It can happen when forum is installed using IPv6 host and it being used in URL. As result all clicks are throwing the same error in red box: "Oops! Something went wrong. Please reload the page and try again."

Steps to Reproduce

  1. Install forum using IPv6 address (f.e. 202::a6a1:990a:cd27:4d9e:79)
  2. Use any default parameters during installation, turn on debug in config.php file
  3. Go to main page and click reload button or try to register new account

Expected Behavior All activities should complete

Screenshots 2021-03-31_00h21_42

Environment

php flarum info
root@ubuntu:/var/www/html/flarum# php flarum info
Flarum core 0.1.0-beta.16
PHP version: 7.4.3
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlrpc, xmlwriter, xsl, zip, Zend OPcache
+----------------------+------------------+--------+
| Flarum Extensions    |                  |        |
+----------------------+------------------+--------+
| ID                   | Version          | Commit |
+----------------------+------------------+--------+
| flarum-approval      | v0.1.0-beta.16   |        |
| flarum-bbcode        | v0.1.0-beta.16   |        |
| flarum-emoji         | v0.1.0-beta.16   |        |
| flarum-lang-english  | v0.1.0-beta.16   |        |
| flarum-flags         | v0.1.0-beta.16   |        |
| flarum-likes         | v0.1.0-beta.16   |        |
| flarum-lock          | v0.1.0-beta.16   |        |
| flarum-markdown      | v0.1.0-beta.16.1 |        |
| flarum-mentions      | v0.1.0-beta.16   |        |
| flarum-statistics    | v0.1.0-beta.16   |        |
| flarum-sticky        | v0.1.0-beta.16   |        |
| flarum-subscriptions | v0.1.0-beta.16   |        |
| flarum-suspend       | v0.1.0-beta.16   |        |
| flarum-tags          | v0.1.0-beta.16   |        |
+----------------------+------------------+--------+
Base URL: http://[202::a6a1:990a:cd27:4d9e:79]:8080
Installation path: /var/www/html/flarum
Debug mode: ON

Possible Solution There is an article with the clear explanation for a possible solution: https://stackoverflow.com/questions/63968329/error-template-parameter-names-must-be-separated

Additional Context More detailed error stack:

SyntaxError: Template parameter names *must* be separated
    at t.exports (http://[202::a6a1:990a:cd27:4d9e:79]:8080/assets/forum-55d936d3.js:1:66159)
    at http://[202::a6a1:990a:cd27:4d9e:79]:8080/assets/forum-55d936d3.js:25:103876
    at new Promise (<anonymous>)
    at Function.request (http://[202::a6a1:990a:cd27:4d9e:79]:8080/assets/forum-55d936d3.js:25:103853)
    at e.request (http://[202::a6a1:990a:cd27:4d9e:79]:8080/assets/forum-55d936d3.js:1:63247)
    at t.e.find (http://[202::a6a1:990a:cd27:4d9e:79]:8080/assets/forum-55d936d3.js:1:50192)
    at t.e.loadResults (http://[202::a6a1:990a:cd27:4d9e:79]:8080/assets/forum-55d936d3.js:52:109405)
    at t.e.refresh (http://[202::a6a1:990a:cd27:4d9e:79]:8080/assets/forum-55d936d3.js:52:109104)
    at HTMLButtonElement.onclick (http://[202::a6a1:990a:cd27:4d9e:79]:8080/assets/forum-55d936d3.js:52:105778)
    at _.handleEvent (http://[202::a6a1:990a:cd27:4d9e:79]:8080/assets/forum-55d936d3.js:25:102481)
askvortsov1 commented 3 years ago

Good thing we have a wrapper around m.request! Although this might be good to open as an upstream issue with the Mithril repo, that might be a better place for a fix.

vikulin commented 3 years ago

Good thing we have a wrapper around m.request! Although this might be good to open as an upstream issue with the Mithril repo, that might be a better place for a fix.

Filed new issue in Mithril repo: https://github.com/MithrilJS/mithril.js/issues/2666

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum. In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!