Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Issue: getCurrentChannelCode() null returned during Bagisto API Installation

    Bug Report
    1
    1
    9
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mahmoudsaaed last edited by

      Hello Everyone,

      I am working on a Bagisto Open Source project hosted on a DigitalOcean Droplet. I am trying to install the Bagisto API Platform package, but I've run into a critical error that is preventing me from proceeding.

      The Issue:
      I emptied my database to perform a clean install, but now every time I try to run any php artisan command, the system crashes with this error:

      Webkul\Core\Core::getCurrentChannelCode(): Return value must be of type string, null returned in .../packages/Webkul/Core/src/Core.php:173

      It seems like a "deadlock" because the channels table is empty, and the system requires a default channel to function, yet I cannot run php artisan db:seed or migrate because of this exact error.

      Technical Details:

      Environment: DigitalOcean (Ubuntu).

      Error Source: packages/Webkul/Core/src/Core.php line 173.

      Context: During bagisto-api-platform:install and general migrations.

      Previous Conflicts: I also encountered some dependency conflicts with laravel/sanctum and intervention/image during the process.

      Question:
      Since the database is currently empty and the artisan commands are locked by this Core error, what is the best way to bypass this and successfully seed the default data?

      Any guidance would be greatly appreciated!![alt Screenshot 2026-03-22 102520.png

      1 Reply Last reply Reply Quote 0
      • First post
        Last post