OPNsense Forum

English Forums => 25.7 Series => Topic started by: Kokaburra on August 13, 2025, 08:18:10 AM

Title: Captive Portal does not accept modified Template folders
Post by: Kokaburra on August 13, 2025, 08:18:10 AM
Hi,

There is an identical topic in the general forum (https://forum.opnsense.org/index.php?topic=47975.msg244439#msg244439) but that seemed to be a dead end since i believe it is dependend on the version of opnsense.

I am a newbie to opnsense. I successfully got my opnsense (25.7.1_1 amd64) running on an refurbished Fujitsu S920, which I upgraded with an dual network card, a 500GB SSD and a fresh 8GB RAM module. I introduced a VLAN and added an GuestWifi Interface which is broadcasted by an Unify U6+ AP.

I am having an issue creating my own template file for the captive portal.

As soon as I change anything with in the default folder and try to upload it I recieve the following error:
[d15dce03-54d4-4ea8-8771-47ab592e23af] Script action failed with Command '/usr/local/opnsense/scripts/OPNsense/CaptivePortal/strip_template.py '/var/lib/php/tmp/cp_8bdf2612-e847-40b4-bce6-35d0f96f99ce.tmp'' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/actions/script_output.py", line 78, in execute subprocess.run(script_command, env=self.config_environment, shell=True, File "/usr/local/lib/python3.11/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '/usr/local/opnsense/scripts/OPNsense/CaptivePortal/strip_template.py '/var/lib/php/tmp/cp_8bdf2612-e847-40b4-bce6-35d0f96f99ce.tmp'' returned non-zero exit status 1.

There seemed to be an issue (https://github.com/opnsense/core/issues/4558) in 2020, which was solved with an revert (https://x.com/opnsense/status/1339847119977533442) but since that was 5 years ago i am reluctant to try this.

I can download and upload the unchanged template_default.zip.