You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preview target URLs will always have an ? (i.e. an empty query string) appended to them, even if there isn't a query string in the "URL Format" setting for that preview target.
Steps to reproduce
Create a section and add a preview target to it with a "URL Format" that doesn't include a query string – for example, {url}
Create an entry in that section
Click the "View" button in entry's edit page to open the preview target URL in a new browser tab
Observe that the URL has an empty query string (i.e. ?) appended to it
Expected behavior
No question mark appended to the URL unless the preview target's URL format has a query string.
Actual behavior
There's a question mark appended to the URL even if there isn't a query string in the preview target's URL format.
Craft CMS version
4.0.1
PHP version
8.1.4
Operating system and version
macOS 12.3.1
Database type and version
MySQL 5.7.37
Image driver and version
No response
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered:
mmikkel
changed the title
[4.x]: Empty query string in preview target URLs via the "View" button
[4.x]: Empty query string in preview target URLs
May 8, 2022
What happened?
Description
Preview target URLs will always have an
?
(i.e. an empty query string) appended to them, even if there isn't a query string in the "URL Format" setting for that preview target.Steps to reproduce
{url}
?
) appended to itExpected behavior
No question mark appended to the URL unless the preview target's URL format has a query string.
Actual behavior
There's a question mark appended to the URL even if there isn't a query string in the preview target's URL format.
Craft CMS version
4.0.1
PHP version
8.1.4
Operating system and version
macOS 12.3.1
Database type and version
MySQL 5.7.37
Image driver and version
No response
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered: