Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use source from profile if none is set in Module. #8439

Merged
merged 3 commits into from
Dec 17, 2024
Merged

Use source from profile if none is set in Module. #8439

merged 3 commits into from
Dec 17, 2024

Conversation

jrouzierinverse
Copy link
Member

Description

Use source from profile if none is set.

Issue

fixes #8392

Delete branch after merge

YES

Checklist

(REQUIRED) - [yes, no or n/a]

  • Document the feature
  • Add OpenAPI specification
  • Add unit tests
  • Add acceptance tests (TestLink)

NEWS file entries

Enhancements

  • Use source from profile if none is set in portal module.

@fdurand
Copy link
Member

fdurand commented Dec 16, 2024

When i try the sponsor (without source defined in the portal module):

2024-12-16T15:46:14.998328-05:00 packetfence-dev httpd.portal-docker-wrapper[423228]: httpd.portal(13) ERROR: [mac:00:11:22:33:44:55] Attribute (source) does not pass the type constraint because: Validation failed for 'pf::Authentication::Source::SponsorEmailSource' with value undef at accessor captiveportal::PacketFence::DynamicRouting::Module::Authentication::Sponsor::source (defined at /usr/local/pf/lib/captiveportal/PacketFence/DynamicRouting/Module/Authentication/Sponsor.pm line 32) line 18

with email:

2024-12-16T15:47:03.566829-05:00 packetfence-dev httpd.portal-docker-wrapper[423228]: httpd.portal(14) ERROR: [mac:00:11:22:33:44:55] Caught exception in captiveportal::Controller::Root->dynamic_application "Can't generate template signin.html: undef error - Can't call method "isa" on an undefined value at /usr/local/pf/lib/captiveportal/PacketFence/Form/Authentication.pm line 79.

Copy link
Member

@fdurand fdurand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It produce error on the captive portal

@jrouzierinverse
Copy link
Member Author

Can you please try again?

@fdurand
Copy link
Member

fdurand commented Dec 17, 2024

Sponsor looks to work now but Email no:

Caught exception in captiveportal::Controller::Root->dynamic_application "Can't generate template signin.html: undef error - Can't call method "isa" on an undefined value at /usr/local/pf/lib/captiveportal/PacketFence/Form/Authentication.pm line 79. Error : undef error - Can't call method "isa" on an undefined value at /usr/local/pf/lib/captiveportal/PacketFence/Form/Authentication.pm line 79."

@fdurand
Copy link
Member

fdurand commented Dec 17, 2024

It works for Email/SMS and Sponsor. I tested other type of source and there is the same kind of issue.
I will open a new PR for the rest of the sources and merge that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants