Forum
Delete page popup not reloading after delete
I have this problem and found an old thread that describes it exactly.
Was there any solution? The message in the console is:
3.3.23f8a1427c17ade109a3.js:1 Uncaught TypeError: window.reload is not a function
at Object.success (3.3.23f8a1427c17ade109a3.js:1)
at u (vendor.23f8a1427c17ade109a3.js:3)
at Object.fireWith [as resolveWith] (vendor.23f8a1427c17ade109a3.js:3)
at n (vendor.23f8a1427c17ade109a3.js:4)
at XMLHttpRequest.<anonymous> (vendor.23f8a1427c17ade109a3.js:4)
It's the latest version of Chrome browser, and my diagnostics are:
Perch: 3.0.10, PHP: 7.1.10, MySQL: 5.5.57, with PDO
Server OS: Linux, litespeed
Installed apps: content (3.0.10), assets (3.0.10), categories (3.0.10), perch_blog (5.6.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', ); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/log7442/public_html/perch
PERCH_CORE: /home/log7442/public_html/perch/core
PERCH_RESFILEPATH: /home/log7442/public_html/perch/resources
Image manipulation: GD
PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: www.loganspianos.com.au
DOCUMENT_ROOT: /home/log7442/public_html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
I have a feeling this was working properly very recently, so not sure what might have changed.
Thanks.
What happens when you disable Javascript in your browser?
FYI, in Perch 3 you no longer need to add
content
andcategories
to yourperch/config/apps.php
.Hi Hussein, I disabled javascript and it works now. It just shows a simple button, but delete returns me to the item list and the item is gone.
I doubt you want to disable Javascript every time you want to delete though. So hopefully someone else can help you further.
So, I found a way to make this work but it's not entirely satisfactory. I went into the javascript file mentioned 3.3.23f8a1427c17ade109a3.js and changed window.reload to location.reload (a suggestion I found on StackOverflow).
After clearing all the caches it now deletes and refreshes the page correctly.
Obviously I'll lose this mod next time I update, but I was hoping to deliver the site this week so it will have to do for now. Any ideas why window.reload stopped working?
Do you mean
window.location.reload
?No, it was location.reload, as per this post:
https://stackoverflow.com/questions/34076034/uncaught-typeerror-window-reload-is-not-a-function
Ok, we'll take a look.