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

Orders list page - js errors #1758

Open
morawcik opened this issue May 19, 2024 · 2 comments · May be fixed by #1762
Open

Orders list page - js errors #1758

morawcik opened this issue May 19, 2024 · 2 comments · May be fixed by #1762
Labels
1.x bug Something isn't working

Comments

@morawcik
Copy link

  • Lunar version: 1.x
  • Laravel Version: 11.x
  • PHP Version: 8.2

When I'm on the orders list page and hit reload in browser I'm getting a lot of js error (in console) like those:

ReferenceError: selectedRecords is not defined at [Alpine] selectedRecords.length (eval at safeAsyncFunction (livewire.js?id=770f7738:1174:21), <anonymous>:3:32)
ReferenceError: isLoading is not defined
    at [Alpine] isLoading (eval at safeAsyncFunction (livewire.js?id=770f7738:1174:21), <anonymous>:3:32)
Uncaught ReferenceError: isRecordSelected is not defined
    at [Alpine] {
            'hidden': false && isGroupCollapsed(''),
            'bg-gray-50 dark:bg-white/5': isRecordSelected('69'),
            '[&>*:first-child]:relative [&>*:first-child]:before:absolute [&>*:first-child]:before:start-0 [&>*:first-child]:before:inset-y-0 [&>*:first-child]:before:w-0.5 [&>*:first-child]:before:bg-primary-600 [&>*:first-child]:dark:before:bg-primary-500': isRecordSelected('69'),
        } (eval at safeAsyncFunction (store.test/vendor/livewire/livewire.js?id=770f7738:1174:21), <anonymous>:5:43)
Uncaught ReferenceError: getRecordsOnPage is not defined
    at eval (eval at safeAsyncFunction (store.test/vendor/livewire/livewire.js?id=770f7738:1174:21), <anonymous>:3:66)
    at [Alpine] const recordsOnPage = getRecordsOnPage()

                                            if (recordsOnPage.length && areRecordsSelected(recordsOnPage)) {
                                                $el.checked = true

                                                return 'checked'
                                            }

                                            $el.checked = false

                                            return null (eval at safeAsyncFunction (store.test/vendor/livewire/livewire.js?id=770f7738:1174:21), <anonymous>:13:59)

But when I'm on the another page (like brands or products) and I got orders then it's ok - errors occurs when I did refresh.

@morawcik morawcik added bug Something isn't working unconfirmed labels May 19, 2024
@alecritson alecritson linked a pull request May 20, 2024 that will close this issue
@glennjacobs glennjacobs added the 1.x label May 20, 2024 — with Linear
@morawcik
Copy link
Author

Didn't notice it before cuz I just started to play more with 1.x but there is a lot of those js errors. Even on the products (list, edit, prices, availability etc) like

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'uri')
    at si (utils.js:228:120)
    at Wo (index.js:70:21)
    at Kt.send (pool.js:44:15)
    at bus.js:83:18
    at Set.forEach (<anonymous>)
    at Vt.createAndSendNewPool (bus.js:75:15)
    at Vt.sendAnyQueuedCommits (bus.js:126:18)
    at bus.js:89:22

@morawcik
Copy link
Author

morawcik commented May 25, 2024

What I've noticed:
If I refresh page to get it works js files (livewire as well) are loaded fine - like this:

<script src="https://domain.com/vendor/livewire/livewire.min.js?id=07f22875" data-csrf="dLw6093YYVStwenGLKZvag4B0Y0QD7qcVQyO9RPW" data-update-uri="/livewire/update" data-navigate-once="true" type="text/javascript"></script>

but when I'm getting this error I see this that those files are commented o.O

Zrzut ekranu 2024-05-25 o 12 49 06

But I guess it's more like Filament problem and not Lunar directly...

Edit
It's something from ->spa() (for panel). I'll try lucky with filament support or find a way to turn off this spa mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants