Giter VIP home page Giter VIP logo

Comments (5)

jguyomard avatar jguyomard commented on July 29, 2024 1

Yes. I've this issue too, on some projects, because Laravel try to load backpack-setting before backpack-crud. According to me, you have to move this line in the boot() section : https://github.com/Laravel-Backpack/Settings/blob/master/src/SettingsServiceProvider.php#L82

Laravel documentation mentions this:

You should never attempt to register any event listeners, routes, or any other piece of functionality within the register method. Otherwise, you may accidentally use a service that is provided by a service provider which has not loaded yet.

https://laravel.com/docs/5.5/providers

from settings.

pavoltanuska avatar pavoltanuska commented on July 29, 2024

oh, I take the suggested fixes back - after trying to run the admin interface in browser the issue came back. What I really did to work around it (this time for real I guess) was to put backpack/settings into dont-discover section in main composer.json file and load the Backpack\Settings\SettingsServiceProvider::class manually in config/app.php

from settings.

tabacitu avatar tabacitu commented on July 29, 2024

Huh... this is odd. Just updated a project to test, then installed it on a fresh laravel - no such issue in my experience.

I wonder if the problem isn't the order, as defined in composer.json - is your settings requirement BEFORE the crud requirement?

Cheers!

from settings.

pavoltanuska avatar pavoltanuska commented on July 29, 2024

@tabacitu the order seems to be correct (it was the first thing I've checked)

"require": {
        "php": ">=7.0.0",
        "backpack/base": "^0.8.0",
        "backpack/crud": "^3.3.0",
        "backpack/settings": "^2.0",
        ...
}

The weird thing is, I've tried to revert my changes back to the default state and now everything works without any issue.

Despite that, @jguyomard's suggestion seems to be correct and should solve this behaviour in the end, so we can probably close this issue after merging his PR.

Thanks!

from settings.

tabacitu avatar tabacitu commented on July 29, 2024

Hi guys,

Just merged @jguyomard 's PR. Please reopen this issue if after a composer update you're still having this problem.

Cheers!

from settings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.