Lost password not working

Questions about how to change the look and feel of various areas of your Zuluru site

Lost password not working

Postby jafo » Tue Jun 11, 2019 12:23 am

Hi Greg,

I stumbled onto a problem which I can't seem to resolve. I'm getting an error after the user clicks "submit" on the lost username / password page, Zuluru goes to send the email and then error's out saying it can't find my custom theme. Is this due to us forcing the theme and I need to "undo" do that for the email?

Code: Select all
2019-06-10 23:41:16 Error: [Cake\Core\Exception\MissingPluginException] Plugin SupremeCourtsTheme could not be found.
#0 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Core/Plugin.php(255): Cake\Core\PluginCollection->get('SupremeCourtsTh...')
#1 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Core/App.php(190): Cake\Core\Plugin::classPath('SupremeCourtsTh...')
#2 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/View/View.php(1746): Cake\Core\App::path('Template', 'SupremeCourtsTh...')
#3 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/View/View.php(1560): Cake\View\View->_paths(NULL)
#4 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/View/View.php(876): Cake\View\View->_getViewFileName(NULL)
#5 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Mailer/Email.php(2726): Cake\View\View->render()
#6 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Mailer/Email.php(2592): Cake\Mailer\Email->_renderTemplates('')
#7 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Mailer/Email.php(2132): Cake\Mailer\Email->_render(Array)
#8 /opt/sc/Zuluru3/src/Controller/AppController.php(1090): Cake\Mailer\Email->send()
#9 /opt/sc/Zuluru3/src/Controller/UsersController.php(627): App\Controller\AppController::_sendMail(Array)
#10 /opt/sc/Zuluru3/src/Controller/UsersController.php(590): App\Controller\UsersController->_emailResetCode(Object(App\Model\Entity\User), Object(App\Model\Entity\Person))
#11 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Controller/Controller.php(610): App\Controller\UsersController->reset_password()
#12 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(120): Cake\Controller\Controller->invokeAction()
#13 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(94): Cake\Http\ActionDispatcher->_invoke(Object(App\Controller\UsersController))
#14 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/BaseApplication.php(235): Cake\Http\ActionDispatcher->dispatch(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#15 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Http\BaseApplication->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#16 /opt/sc/Zuluru3/src/Middleware/AffiliateConfigurationLoader.php(19): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#17 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): App\Middleware\AffiliateConfigurationLoader->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#18 /opt/sc/Zuluru3/src/Http/Middleware/ActAsMiddleware.php(56): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#19 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): App\Http\Middleware\ActAsMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#20 /opt/sc/Zuluru3/vendor/cakephp/authorization/src/Middleware/AuthorizationMiddleware.php(113): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#21 /opt/sc/Zuluru3/src/Application.php(445): Authorization\Middleware\AuthorizationMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#22 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): App\Application->App\{closure}(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#23 /opt/sc/Zuluru3/src/Application.php(382): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#24 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): App\Application->App\{closure}(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#25 /opt/sc/Zuluru3/src/Application.php(348): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#26 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): App\Application->App\{closure}(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#27 /opt/sc/Zuluru3/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php(121): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#28 /opt/sc/Zuluru3/src/Application.php(335): Authentication\Middleware\AuthenticationMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#29 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): App\Application->App\{closure}(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#30 /opt/sc/Zuluru3/vendor/dereuromark/cakephp-ajax/src/Middleware/AjaxMiddleware.php(72): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#31 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): Ajax\Middleware\AjaxMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#32 /opt/sc/Zuluru3/src/Http/Middleware/CookiePathMiddleware.php(33): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#33 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): App\Http\Middleware\CookiePathMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#34 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Middleware/EncryptedCookieMiddleware.php(89): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#35 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Http\Middleware\EncryptedCookieMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#36 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php(108): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#37 /opt/sc/Zuluru3/src/Application.php(300): Cake\Http\Middleware\CsrfProtectionMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#38 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): App\Application->App\{closure}(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#39 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php(140): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#40 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Http\Middleware\BodyParserMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#41 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php(162): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#42 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Routing\Middleware\RoutingMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#43 /opt/sc/Zuluru3/vendor/ozee31/cakephp-cors/src/Routing/Middleware/CorsMiddleware.php(32): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#44 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cors\Routing\Middleware\CorsMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#45 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/I18n/Middleware/LocaleSelectorMiddleware.php(65): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#46 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\I18n\Middleware\LocaleSelectorMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#47 /opt/sc/Zuluru3/src/Middleware/ConfigurationLoader.php(19): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#48 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): App\Middleware\ConfigurationLoader->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#49 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php(88): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#50 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Routing\Middleware\AssetMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#51 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php(96): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#52 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Error\Middleware\ErrorHandlerMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#53 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Runner.php(51): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#54 /opt/sc/Zuluru3/vendor/cakephp/cakephp/src/Http/Server.php(98): Cake\Http\Runner->run(Object(Cake\Http\MiddlewareQueue), Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#55 /opt/sc/Zuluru3/webroot/index.php(41): Cake\Http\Server->run()
#56 {main}
Request URL: /users/reset_password
Referer URL: https://localhost/users/reset_password

Let me know if you need more detail?

Thanks,
Brian
jafo
 
Posts: 31
Joined: Thu Dec 06, 2018 10:18 am

Re: Lost password not working

Postby jafo » Tue Jun 11, 2019 12:44 am

FYI: I just tried disabling the "setting of the theme" and that didn't work.
jafo
 
Posts: 31
Joined: Thu Dec 06, 2018 10:18 am

Re: Lost password not working

Postby GregS » Tue Jun 11, 2019 12:57 am

Haven't seen that before, and timing is bad; I'm leaving tomorrow night for two weeks away, and tomorrow is going to be busy. :-(
GregS
Site Admin
 
Posts: 234
Joined: Thu Jan 06, 2011 4:58 pm

Re: Lost password not working

Postby jafo » Tue Jun 11, 2019 2:18 pm

Bummer... I will see what I can do via debugging.

Enjoy your trip!
jafo
 
Posts: 31
Joined: Thu Dec 06, 2018 10:18 am

Re: Lost password not working

Postby jafo » Mon Jul 15, 2019 1:44 pm

Hi Greg,

I'm wondering if you are back and can help? Here is what I have found so far:
- lost password doesn't pass through the InitializationListener.php like other requests
- In the view.php (zuluru3 root dir/vendor/cakephp/cakephp/src/View/View.php) it looks like it errors out because it can't find a theme and the theme is set to null
- I have tried to "force" the theme in the email.php but that doesn't seem to take affect. It looks like a brand new request and so the controllers don't seem to have access to what was set.

Could this be a backward capability issue because I see a lot of notes of deprecated functions?

Thanks,
Brian
jafo
 
Posts: 31
Joined: Thu Dec 06, 2018 10:18 am

Re: Lost password not working

Postby GregS » Mon Jul 22, 2019 2:20 am

Hoping to get this sorted in the next day or two. A couple questions to clarify, and make sure that what I'm doing matches what you've got.

1. How are you configuring Zuluru to use your theme?
2. What files do you have under your theme's src/Template folder? (Complete list of all files with full paths, relative to /plugins.)
3. The problem is not the "forgot password" page itself, but when it tries to send the email?
4. Other emails from the system work okay?
GregS
Site Admin
 
Posts: 234
Joined: Thu Jan 06, 2011 4:58 pm

Re: Lost password not working

Postby jafo » Thu Oct 10, 2019 4:41 pm

Hey Greg,

Sorry for such a slow reply. I got caught with my other day job :). I was able to get my email working by adding this:

$this->addPlugin('MyTheme');

to the bootstrap() method of the application.php file. What I found was that the theme setting that we had "hacked" in the Event/InitializationListener.php wasn't getting called as part of the execution thread to send the email.

Obviously, this isn't ideal but could I suggest a setting in the application config where you list all of the plugins you want to load in an array of strings which the Application.php files loads instead of hard coding each one.

Let me know your thoughts on my suggestion.

~Brian
jafo
 
Posts: 31
Joined: Thu Dec 06, 2018 10:18 am


Return to Theming

Who is online

Users browsing this forum: No registered users and 0 guests

cron