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

Wrong module reference in example form submit #6

Open
MetaDevelopment opened this issue Feb 4, 2023 · 1 comment
Open

Wrong module reference in example form submit #6

MetaDevelopment opened this issue Feb 4, 2023 · 1 comment

Comments

@MetaDevelopment
Copy link

Hi Lindsey,

Thank you for sharing this very useful business logic template.

I've bumped into an issue which I encountered a couple of years ago as well:
https://craftcms.stackexchange.com/questions/33752/doublesecretagency-business-logic-module-template-404-on-example-form-action
The example form action doesn't work.

Back then I've resolved it by using another approach, but I've looked a bit more into it now and the issue seems to be quite simple: the module is referenced incorrectly in the example code. The example action-input is:

<input type="hidden" name="action" value="business-logic/example/example-form-submit">

but it should be:

<input type="hidden" name="action" value="businesslogic/example/example-form-submit">

Omitting the dash in the "business-logic" name, since the module is being loaded as "businesslogic" instead.

@lindseydiloreto
Copy link
Collaborator

Awesome, glad you've found this module template to be helpful! 🙏

Thanks for reporting the fix. I think there was a change at some point which created some confusion around the controller paths. But I believe you are right, businesslogic is the correct format in this context.

However, I probably won't be pushing an update for that... we're actually on the verge of retiring this repo.

Now that an official module generator has been released, we'll most likely phase out this template module. I'm glad to know that it's helped so many people over the years, but its days are certainly numbered.

Thanks again for reporting!

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

No branches or pull requests

2 participants