I’m developing a custom addon that is a fairly simple custom form – it defines some variables as template tags in a module file and then those tags are used in an associated template. One of the variables it defines is the action for that form. I was using the site_url() helper to try to format it correctly, but it’s not behaving as expected.
From the docs (https://docs.expressionengine.com/latest/development/legacy/helpers/url_helper.html), it looks like the input parameter should be the desired URI, and then that is appended to the site_url variable from the config file. However when I do a call like this:
site_url("path/to/page");
I get back
https://example.com/?path/to/page
when this variable is rendered in the template. Outputting the helper with no arguments returns just the site_url as expected, with no trailing query marker.
Is anyone able to replicate this behavior, or are there any site settings I should check? I am using EE 3.5.16 but have also seen this behavior in my test EE 4.3.3 environment.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.