Notice to download index.php on saving a webpage

Hi, I’m new on this forum and I don’t know to much about MODX as I’m just the guy that puts in content in pages of a website.
The guy who made the website knows a lot more but together we can’t figure out how to deal with the following problem:
When I save a page often a message shows up asking wether I want to download index.php.
Whatever I do a progressbar shows up while the page is saved. However the system enters a loop, constantly saving the page.
The only way-out is to end the browser session and my work is lost…
What is going on and how can we fix this?
Regards, Peter

Please also provide your MODX, PHP and Server Versions, so we know what you’re running.

Welcome to the community @PeterVrlp!

A few more questions:

  • Do you see any errors in the logs? Or the server’s PHP log?
  • If you look in your browser’s console, do you see any errors there?
  • Does the problem occur in other browsers?

Try renaming the .htaccess file to something else temporarily, to make sure the problem is (or is not) in there.

Hi Jim, thanks for your post. Before there were no entries in the MODX log but now, I just made a page crash, it shows:
[2020-03-29 22:45:02] (ERROR @ /mnt/web418/e0/44/59590044/htdocs/toneelmuseum/web/core/model/modx/modcachemanager.class.php : 322) Could not cache resource 1
It shows this twice.
I’ll aks my colleague who manages the site about the PHP log.
The bowserconsole shows no error on a crash, just some warnings.
However when a page saves succesfully it shows:
error: uncaught exception: The editor instance “tv10” is already attached to the provided element.
The problem does occur in other browsers.

vibedesign, markh: I’ll come back to you later.
Regards, Peter

@PeterVrlp, are you; or were you ever using “CKEditor” for your WYSIWYG by any chance?

No I just use the editor in Template Variables.
I did notice that crashes sometimes can be avoided by removing the labels <p and </p (I left out the > as it will not show here) in the sourcecode.
When a page is succesfully saved it can crash after just changing one letter, or tick the publising check-box.
Removing some content can sometimes fix it.
There’s realy no logic in what is triggering it.

Hi, I had a further look in MODX:
MODX Revolution 2.7.2-pl (traditional)
PHP Version 7.3.16

I can’t find Server Versions yet. Is it in System Info of MODX?

Ok, this is what have:
MODX Revolution 2.7.2-pl (traditional)
PHP Version 7.3.16
SunOS localhost 5.10 Generic_150401-49 i86pc
Apache/2.4.41 (Unix)

Does that help?

Hi, an update
I found out today that when I’m using the ‘Quick update’ function in the tree structure no crashes occur.
So that’s a nice work-around. However that does not work with a page representing a time-line.
In there, content is placed in Template Variables.

Regards, Peter

I just want to add in here that I’ve also been experiencing page hangs on save on two different sites, both running v2.7.3. One site is a new site (fresh install of 2.7.3), the other was recently upgraded. I had it happen very occasionally on 2.7.2, but since I updated it’s been happening sometimes as often as every 2-3 page saves. I also experience it on my local 2.7.3 install. I’m not getting a prompt to download the page, just the endless progress bar. I have to refresh the page and redo my changes.

This is in Firefox. Next time I’m in there, I’ll try in Chrome and see if it happens there.

Hi, nice to know that I’m not the only one!

For all:
Not all crashes of a specific page are recorded in the error log.
If it is recorded it varies, one line:
ERROR @ /mnt/web418/e0/44/59590044/htdocs/toneelmuseum/web/core/model/modx/
modcachemanager.class.php : 322) Could not cache resource 1

or multiple entries (one crash):
(ERROR @ /mnt/web418/e0/44/59590044/htdocs/toneelmuseum/web/core/model/modx/
modcachemanager.class.php : 349) Error caching lexicon topic lexicon/nl/stercseo/default
modcachemanager.class.php : 349) Error caching lexicon topic lexicon/en/emo/default
modcachemanager.class.php : 349) Error caching lexicon topic lexicon/en/wayfinder/properties
modcachemanager.class.php : 349) Error caching lexicon topic lexicon/nl/wayfinder/properties
modcachemanager.class.php : 349) Error caching lexicon topic lexicon/en/login/properties
modcachemanager.class.php : 349) Error caching lexicon topic lexicon/nl/login/properties
modcachemanager.class.php : 514) Error caching script elements/modsnippet/31
modcachemanager.class.php : 514) Error caching script elements/modplugin/9
modcachemanager.class.php : 349) Error caching lexicon topic lexicon/en/login/default

(ERROR @ /mnt/web418/e0/44/59590044/htdocs/toneelmuseum/web/core/xpdo/cache/
xpdocachemanager.class.php : 1039) PHP warning: filesize(): stat failed for /mnt/web418/e0/44/59590044/htdocs/toneelmuseum/web/core/cache/lexicon_topics/lexicon/nl/emo/default.cache.php

Are the numbers after class.php any help?

Sorry @PeterVrlp, I’m coming up dry.

I don’t believe the lexicon errors are the cause of your problem. I’ll keep thinking about it and looking around.

Bit of a shot in the dark but could this be caused by the cache files being appended rather than being overwritten? What happens if you completely disable all caching? I only ask because I had a similar problem with one hosting company and just could not get rid of it.

Hi Jim, to sure I’ve asked my colleague and yes we are using the CKEditor.

Interesting. Could you try temporarily disabling CKEditor?

OK, we will disable CKEditor and test it.
This screenshot shows part of a no rich text page, in MODX manager, containing several time-lines, events on a time-line are entered in the tab Template variables. We could not save that page anymore. On the right is the coloum Title. The three items all contains a link to audio but only the first shows the player. There is a audioplayer in the other two, you see it when edit the item and on the website it shows an works alright. I examend those items and in the sourcecode I found the code (ampersand)nbsp; I removed that code and then it saves OK.
Now I wonder how that code got in there and was saved earlier and why is it now a problem.

We managed to get all data from the database that is linked to the page, I mentioned before, in one file.
The code (ampersand)nbsp; occurs many times, so the code itself is not the problem.
What makes the 2 items, with the problem, unique is this line (part) in the database:


the double \n
Double \n occurs many times in other items but never after (ampersand)nbsp;
So we have to figure out how to avoid this.

ive got the same error today on a Strato Webhosting Account. After entering a long Text, the server reply with error 500 and that caused the index.php download. Because its Strato Webhosting, i dont have something to debug like a logfile or so ):

I split the Text in several parts, now the error occurs when i enter a Url (

At first i think about a to large poststring. But if i duplicate the content already saved it works. Seems that there is an bug with large text and special characters, hm.

I use MODX 2.7.3-pl, Contentblocks 1.8.15-pl and Redactor 3.0.1-pl. Disabling all doenst solve it.

I try it on an other enviroment, works fine. So it musst be a local PHP configuration. I did a phpinfo() comparison but doesnt find a hint. Maybe it helps or am i on the wrong path?

good morning,
i found an setting inside strato that caused the error for my problem! there is a configuration for guestbooks, seems that the sending post will be checked and if it dont fit, you get the error 500. Here you can deactivate it, if you run to the same problem on strato webservers: