e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Bug]: wrong url in chatbox menu if cb_layer 2 is selected #5143

Open Jimmi08 opened 6 months ago

Jimmi08 commented 6 months ago

What e107 version are you using?

v2.3.3

Bug description

Not testing if the query is set and always adding ?

$texta = "\n<form id='chatbox' action='" . e_SELF . '?' . e_QUERY . "' method='post' onsubmit='return(false);'>

How to reproduce

Set chatbox type = 2 Display chatbox inside scrolling layer with height and try it on news.php or so... index.php

Expected behavior

Do it the same way how other 2 options work - check e_QUERY and only add it if it is set

Fix (like other options)

        $texta = (e_QUERY
            ? "\n<form id='chatbox' method='post' action='" . e_SELF . '?' . e_QUERY . "'"
            : "\n<form id='chatbox' method='post' action='" . e_SELF . "'");

        $texta .= "  method='post' onsubmit='return(false);'>' 

What browser(s) are you seeing the problem on?

Chrome / Brave

PHP Version

7.4

Jimmi08 commented 6 months ago

Check on e107.nl

image