Bug #14598
closedLink to view Captive Portal custom HTML page content does not work
100%
Description
Hi PFSense developers,
we run about 200+ locations and recently updated around 50% of the locations to 2.7.0
We noticed that the link to view the portal page content is not working anymore - it leads back to the webinterface. However, the link to view the error page works fine.
This one does not work: https://xxxxxxxx.spdns.org/services_captiveportal.php?zone=zone_174&act=viewhtml
This one works properly: https://xxxxxxxx.spdns.org/services_captiveportal.php?zone=zone_174&act=viewerrhtml
Updated by Jim Pingle over 1 year ago
- Target version set to 2.8.0
- Plus Target Version set to 23.09
Looks like the regex at source:src/usr/local/www/services_captiveportal.php#L73 isn't quite right. It won't match viewhtml
as it is currently.
This diff might be a quick fix. I don't have a setup with custom HTML handy to test at the moment though.
diff --git a/src/usr/local/www/services_captiveportal.php b/src/usr/local/www/services_captiveportal.php
index 19d44093de..9d03e38ced 100644
--- a/src/usr/local/www/services_captiveportal.php
+++ b/src/usr/local/www/services_captiveportal.php
@@ -788,7 +788,7 @@ if ($pconfig['page']['htmltext']) {
$group->add(new Form_Button(
'btnview',
'View Page Contents',
- '?zone=' . $cpzone . '&act=viewhtml',
+ '?zone=' . $cpzone . '&act=viewhtmlhtml',
'fa-file-text-o'
))->addClass('btn btn-info btn-xs')->setAttribute("target", "_blank");
Updated by Volker Werbus over 1 year ago
Jim,
yep, I can confirm: This fix works fine!
Best,
Volker
Updated by Jim Pingle over 1 year ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset d536506909c89b5f42e6bf1c63cf02e723b0fb72.
Updated by Danilo Zrenjanin over 1 year ago
- Status changed from Feedback to Resolved
The patch fixes it.
I am marking this ticket resolved.
Updated by Jim Pingle over 1 year ago
- Subject changed from View portal page content - link not working to Link to view Captive Portal custom HTML page content does not work
Updating subject for release notes.
Updated by Jim Pingle about 1 year ago
- Target version changed from 2.8.0 to 2.7.1