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] Gravatar doesn't get loaded twice in dev mode. #5537

Open
Kasparsu opened this issue Jun 6, 2024 · 2 comments
Open

[Bug] Gravatar doesn't get loaded twice in dev mode. #5537

Kasparsu opened this issue Jun 6, 2024 · 2 comments
Labels

Comments

@Kasparsu
Copy link
Contributor

Kasparsu commented Jun 6, 2024

Bug report

What I did

Loaded a sidebar layout admin view

What I expected to happen

gravatar to be showed both in side panel and mobile view navbar

What happened

It loads mobile view top bar correctly from gravatar link but on sidebar it wants to load it from basset cache but it hasn't cached it because dev mode.

this seems to be issue with LOADED state being checked for $avatarLink

if (in_array(Basset::basset($avatarLink, false)->name, ['INTERNALIZED', 'IN_CACHE', 'LOADED'])) {

What I've already tried to fix it

nothing

Is it a bug in the latest version of Backpack?

yes

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

8.2.4

PHP EXTENSIONS:

Core, bcmath, calendar, ctype, date, filter, hash, iconv, json, SPL, pcre, random, readline, Reflection, session, standard, mysqlnd, tokenizer, zlib, libxml, dom, PDO, openssl, SimpleXML, xml, xmlreader, xmlwriter, curl, fileinfo, mbstring, Phar, pdo_mysql, pdo_sqlite

LARAVEL VERSION:

11.9.2.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.3.4
backpack/crud: 6.7.15
backpack/generators: v4.0.5
backpack/theme-tabler: 1.2.10

@Kasparsu
Copy link
Contributor Author

Kasparsu commented Jun 6, 2024

@tabacitu since you come up in gitblame can you explain the need of LOADED if at all. If its not needed and a bug I can make a pull request removing it.

Is it for race conditions when caching has started but we haven't finished yet, but another asset of same type is being loaded?
If this is the case then fault lies with basset setting LOADED state when in devmode

@jcastroa87
Copy link
Member

Hello @Kasparsu

I hope you are doing well.

Can you share the code you are using for sidebar and load the gravatar

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants