Thread tagged as: Question, Error

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_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
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.


Alan Coggins

Alan Coggins 0 points

  • 3 years ago
Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

What happens when you disable Javascript in your browser?

FYI, in Perch 3 you no longer need to add contentand categories to your perch/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.

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

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?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you mean window.location.reload ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, we'll take a look.