pimcore / admin-ui-classic-bundle

Other
10 stars 98 forks source link

[Bug]: icon image path error #107

Closed mhgtlc closed 1 month ago

mhgtlc commented 1 year ago

Error: Uncaught ReferenceError: L is not defined

file: public/js/pimcore/startup.js:962

L.Icon.Default.imagePath = '../bundles/pimcoreadmin/build/admin/images/';
aryaantony92 commented 1 year ago

Unable to reproduce the error. It's working now

mhgtlc commented 1 year ago

@aryaantony92

Unable to reproduce the error. It's working now

The error is still there:

https://github.com/pimcore/admin-ui-classic-bundle/blob/1.x/public/js/pimcore/startup.js#L962C1-L962C3 Where does this L come from?

aryaantony92 commented 1 year ago

@mhgtlc Could you please try again with the latest version ?

dvesh3 commented 1 year ago

@aryaantony92 @mhgtlc L. is a leaflet object (used mainly for Geo datatypes). I'm wondering why this is not part of admin bundle? 🤔

aryaantony92 commented 1 year ago

https://github.com/pimcore/admin-ui-classic-bundle/blob/8846027e49027d124fcccf9b73f8e1040c18ebbf/public/js/pimcore/startup.js#L962 This is in the admin bundle.

storbahn commented 8 months ago

I still have this error L.Icon.Default.imagePath = '../bundles/pimcoreadmin/build/admin/images/'; (js error in browser console)

We use the pimcore version 11.1.5 and the admin bundle with version 1.3.4

aarongerig commented 8 months ago

Same here. I get a L is not defined error in the console, when loading the Pimcore Backend.

@dvesh3 This issue should be re-opened as it doesn't seem to be fixed, right?

aarongerig commented 8 months ago

@dvesh3 WDYT? 🙂

sevarozh commented 7 months ago

I can also confirm it with:

It looks like the "Leaflet" library is loaded later than L.Icon.Default.imagePath is called in startup.js. After loading of admin, L is defined in console: Bildschirmfoto 2024-03-28 um 11 37 49

Issue is closed, but I can't find a commit with a bug fix @aryaantony92

mhgtlc commented 7 months ago

@brusch @dvesh3 @aryaantony92 Issue is still there:

And indeed, behaviour is the same as @sevarozh described above (It looks like the "Leaflet" library is loaded later than L.Icon.Default.imagePath is called in startup.js)

fashxp commented 7 months ago

can you share more detailed steps to reproduce? can it be reproduced on our demo?

robertSt7 commented 1 month ago

@mhgtlc @sevarozh @aarongerig @storbahn Could you please test if this patch fix the problem? TIA https://github.com/pimcore/admin-ui-classic-bundle/pull/697

aarongerig commented 1 month ago

@robertSt7 This indeed resolves the issue on my side. 👍🏻