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

500 Error When Accessing CHTrips Module from Pilot Dashboard in PHPVMS7 #4

Open
CaptainGodual opened this issue Aug 31, 2024 · 0 comments

Comments

@CaptainGodual
Copy link

CaptainGodual commented Aug 31, 2024

Description:
I'm encountering a 500 Internal Server Error when trying to access the CHTrips module from the Pilot Dashboard in PHPVMS7. The error seems to be related to a division by zero in the module's code.

Steps to Reproduce:

  1. Downloaded the CHTrips module from the releases.
  2. Extracted the module into the Modules directory.
  3. Enabled the module in the admin panel.
  4. Cleared all caches (system, browser, etc.).
  5. Navigated to the Pilot Dashboard.
  6. Clicked on the "Trips" link.

Expected Behavior:
The module should display the Trips section without errors.

Actual Behavior:
The browser returns a 500 Internal Server Error when trying to access the Trips section from the Pilot Dashboard.

Error Logs:
[2024-08-31 18:38:54] production.ERROR: Division by zero {"userId":1,"exception":"[object] (DivisionByZeroError(code: 0): Division by zero at /home/skywarda/crew.skywardair.xyz/modules/CHTrips/Http/Controllers/Frontend/IndexController.php:55)
[stacktrace]
#0 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Modules\CHTrips\Http\Controllers\Frontend\IndexController->index(Object(Illuminate\Http\Request))
#1 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\Controller->callAction('index', Array)
#2 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Modules\CHTrips\Http\Controllers\Frontend\IndexController), 'index')
#3 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#4 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\Routing\Route->run()
#5 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#6 /home/skywarda/crew.skywardair.xyz/app/Http/Middleware/SetActiveLanguage.php(22): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#7 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\Http\Middleware\SetActiveLanguage->handle(Object(Illuminate\Http\Request), Object(Closure))
#8 /home/skywarda/crew.skywardair.xyz/app/Http/Middleware/SetActiveTheme.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#9 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\Http\Middleware\SetActiveTheme->handle(Object(Illuminate\Http\Request), Object(Closure))
#10 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#11 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#12 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#13 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Auth\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#14 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#15 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#16 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#17 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest(Object(Illuminate\Http\Request), Object(Illuminate\Session\Store), Object(Closure))
#18 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#19 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#20 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#21 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#22 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#23 /home/skywarda/crew.skywardair.xyz/app/Http/Middleware/InstalledCheck.php(30): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#24 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\Http\Middleware\InstalledCheck->handle(Object(Illuminate\Http\Request), Object(Closure))
#25 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(796): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#27 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(775): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#28 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#29 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Routing/Router.php(728): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#30 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#31 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#32 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#33 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Foundation/Http

/Middleware/TransformsRequest.php(21): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#34 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/HandlePrecognitiveRequests.php(47): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests->handle(Object(Illuminate\Http\Request), Object(Closure))
#36 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(87): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#39 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))
#40 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#41 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#42 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#43 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#44 /home/skywarda/crew.skywardair.xyz/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#45 /home/skywarda/crew.skywardair.xyz/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#46 {main}
"}

Environment Details:

  • PHPVMS7 version: 7.0.0-beta.5
  • PHP version: PHP 8.1

Additional Information:
The error persists even after disabling the module then clearing caches and reuploading the module files and renabling it and clearing cache again as instructions say. It seems to be related to a calculation within the code. Any guidance on how to resolve this issue would be greatly appreciated.

@CaptainGodual CaptainGodual changed the title **Title:** 500 Error When Accessing CHTrips Module from Pilot Dashboard in PHPVMS7 500 Error When Accessing CHTrips Module from Pilot Dashboard in PHPVMS7 Aug 31, 2024
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

1 participant