dgrammatiko / invalidate-cache

A Joomla module to refresh the mediaversion hash. This effectively invalidates the browsers caches
https://invalidate-cache.dgrammatiko.dev
GNU General Public License v3.0
8 stars 0 forks source link

"blew up" error msg #33

Closed woluweb closed 2 years ago

woluweb commented 2 years ago

Hi @dgrammatiko

If you remember, there was this "blew up" error msg that you solved on the "dev.festival___" website.

Good news: it still works. Bad news: I installed the Module on another site... and there it also always says that it "blew up".

Could it be that the fix is not integrated in the repo?

Txs

dgrammatiko commented 2 years ago

What are the versions for Joomla and this module?

woluweb commented 2 years ago

using 4.1.2 version for Joomla (of course ;) ) And using the download button on https://invalidate-cache.dgrammatiko.dev/ for the Module

dgrammatiko commented 2 years ago

Do you get any errors in your browser's console?

woluweb commented 2 years ago

ohhh, yes indeed:

Failed to load resource: the server responded with a status of 500 ()   
https://2022.MYDOMAIN.eu//administrator/index.php?option=com_ajax&format=json&module=invalidatecache&method=invalidate&e7e37371e0640a3e625e52158a3a502a=1

and that link gives

{
error: true,
code: 0,
message: "Not Allowed",
trace: "#0 /home/brusenjq/2022/components/com_ajax/ajax.php(99): Ttc\Module\Invalidatecache\Administrator\Helper\InvalidatecacheHelper::invalidateAjax()
#1 /home/brusenjq/2022/administrator/components/com_ajax/ajax.php(12): require_once('/home/brusenjq/...')
#2 /home/brusenjq/2022/libraries/src/Dispatcher/LegacyComponentDispatcher.php(69): require_once('/home/brusenjq/...')
#3 /home/brusenjq/2022/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
#4 /home/brusenjq/2022/libraries/src/Component/ComponentHelper.php(389): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#5 /home/brusenjq/2022/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent()
#6 /home/brusenjq/2022/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch()
#7 /home/brusenjq/2022/libraries/src/Application/CMSApplication.php(278): Joomla\CMS\Application\AdministratorApplication->doExecute()
#8 /home/brusenjq/2022/administrator/includes/app.php(63): Joomla\CMS\Application\CMSApplication->execute()
#9 /home/brusenjq/2022/administrator/index.php(32): require_once('/home/brusenjq/...')
#10 {main}"
}
dgrammatiko commented 2 years ago

Ok, let me know if version 0.0.11 is ok

woluweb commented 2 years ago

(well, I can't find any download link to 0.0.11 here or on https://invalidate-cache.dgrammatiko.dev/ where it is still 0.0.10)

dgrammatiko commented 2 years ago

It should be there now, I forgot to publish the changes.

woluweb commented 2 years ago

Even before clicking there is an error in the Console now:

Uncaught ReferenceError: el is not defined
default.js?13a681acaa7ef0332e5d429bc971888b:33 
    at default.js?13a681acaa7ef0332e5d429bc971888b:33:3
    at Array.forEach (<anonymous>)
    at default.js?13a681acaa7ef0332e5d429bc971888b:10:2
dgrammatiko commented 2 years ago

Ooops, could you uninstall it and re download it and install it? I messed up a file

woluweb commented 2 years ago

not yet it seems :D

default.js?f532fbb0569de5b8dca2eedf713edb68:19          POST https://2022.DOMAINNAME.eu/administrator/index.php?option=com_ajax&format=json&module=invalidatecache&method=invalidate&e7e37371e0640a3e625e52158a3a502a=1 500
(anonymous) @ default.js?f532fbb0569de5b8dca2eedf713edb68:19
default.js?f532fbb0569de5b8dca2eedf713edb68:26

Uncaught (in promise) ReferenceError: err is not defined
    at HTMLAnchorElement.<anonymous> (default.js?f532fbb0569de5b8dca2eedf713edb68:26:21)
(anonymous) @ default.js?f532fbb0569de5b8dca2eedf713edb68:26
dgrammatiko commented 2 years ago

Can you try the same as before?

woluweb commented 2 years ago

what do you mean? uninstall and reinstall 0.0.11?

dgrammatiko commented 2 years ago

yes, and then post what's the error you're getting

woluweb commented 2 years ago

The good news is: now after clicking I get "Something blew up!"

Before clicking on the btn, no error in the console. After clicking

DevTools failed to load source map: Could not load content for chrome-extension://cmjjfmkpcickmapganbaipcblolkapbm/js/vendor/browser-polyfill.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
default.js?e07ec49927528781e69127583b0b7a93:19          POST https://2022.DOMAINNAME.eu/administrator/index.php?option=com_ajax&format=json&module=invalidatecache&method=invalidate&e7e37371e0640a3e625e52158a3a502a=1 500
(anonymous) @ default.js?e07ec49927528781e69127583b0b7a93:19
default.js?e07ec49927528781e69127583b0b7a93:26 Response {type: 'basic', url: 'https://2022.DOMAINNAME.eu/administrator/index.…hod=invalidate&e7e37371e0640a3e625e52158a3a502a=1', redirected: false, status: 500, ok: false, …}
(anonymous) @ default.js?e07ec49927528781e69127583b0b7a93:26

Note: if you want the credentials, feel free to ask ;)

dgrammatiko commented 2 years ago

Do you have Debug enabled?

@woluweb Can you add a temp user?

woluweb commented 2 years ago

yes, since this evening. But the error msg is also there when I disable Debug mode (just tested) I send you credentials by email

dgrammatiko commented 2 years ago

Ok @woluweb , so 0.0.11 should be fine now. You can destroy the temp user

Thanks for reporting and letting me use the machine to figure out the bug

woluweb commented 2 years ago

I tested the latest version on https://subform.joomlacustomfields.org/ (where it had always been on "blew up") and now it works there too. Txs for the new version. Exciting :)