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

[BUG] Error - Call to undefined LayoutHerlper::isPreloaderEnabled() #1257

Closed
wbetalleluzd opened this issue Mar 9, 2024 · 9 comments
Closed

Comments

@wbetalleluzd
Copy link

wbetalleluzd commented Mar 9, 2024

image

Just updated today.

I comment that and is running now.

{{-- Preloader Animation --}}
{{-- @if($layoutHelper->isPreloaderEnabled())
@include('adminlte::partials.common.preloader')
@endif --}}
@dfsmania
Copy link
Collaborator

dfsmania commented Mar 9, 2024

@wbetalleluzd Please see #1256 , probably you published the package views previously and now you need to follow the complete Update Procedure. In other words, you need to update the previously published views in order to synchronize them with the new package version.

@dfsmania dfsmania changed the title [BUG] I updated today and Error [BUG] Error - Call to undefined LayoutHerlper::isPreloaderEnabled() Mar 9, 2024
@dfsmania dfsmania pinned this issue Mar 9, 2024
@adrianblynch
Copy link

@wbetalleluzd Please see #1256 , probably you published the package views previously and now you need to follow the complete Update Procedure. In other words, you need to update the previously published views in order to synchronize them with the new package version.

Should this have been a major update rather than a minor? I suppose it's a tricky one where publishing is involved.

@resslinger
Copy link
Collaborator

I have reverted the patch version v3.9.5 and released the minor version v3.10.0.

@dfsmania
Copy link
Collaborator

dfsmania commented Mar 13, 2024

Oh, we could actually add backward compatibility by adding again LayoutHerlper::isPreloaderEnabled() that just call the method that is now in the PreloaderHelper class, but it will be a redundant method. What do you think @resslinger ?

On the other hand, if you want to access the new features, the review of previously published views is mandatory.

@SammyJoseph
Copy link

SammyJoseph commented Mar 17, 2024

There was not any method called isPreloaderEnabled() in vendor\jeroennoten\laravel-adminlte\src\Helpers\LayoutHelper.php
I added the method after line 24:

/**
     * Check if the preloader animation is enabled.
     *
     * @return bool
     */
    public static function isPreloaderEnabled()
    {
        return config('adminlte.preloader.enabled', false);
    }

@dfsmania
Copy link
Collaborator

@SammyJoseph The method was moved to a new class, due to a split-out refactor, it's now on the PreloaderHelper.php class:

public static function isPreloaderEnabled($mode = 'fullscreen')

Please, follow the update procedure and update your published views to sync them with the newest package version.

@pervilla
Copy link

pervilla commented Mar 18, 2024

I solved it with the following: php artisan adminlte:install --only=main_views --force
Reference: https://github.com/jeroennoten/Laravel-AdminLTE/wiki/Updating

@dfsmania
Copy link
Collaborator

I solved it with the following: php artisan adminlte:install --only=main_views --force Reference: https://github.com/jeroennoten/Laravel-AdminLTE/wiki/Updating

@pervilla You should be careful about using --force, because you will lose previous changes on the published views. You usually publish the views when you need to make a customization. So, it's always recommended to backup your set of published views before executing the previous command.

@dfsmania
Copy link
Collaborator

Closed, a solution to the issue was provided!

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

6 participants