B
B
BloodVIRUS2016-11-27 16:44:38
PHP
BloodVIRUS, 2016-11-27 16:44:38

Ajax getting a chunk with tag parsing, how?

Hello. There was a task of a not very complicated Ajax directory, with which some difficulties arose ... Namely: s7535.h7.modhost.pro
The bottom line is that for some reason almost everything is ignored in chunks except for html when an Ajax request is made.
It would seem that everything should be simple, we send a request somewhere from the form (in the example above, the request goes to ajax.php)
In the php file, a chunk request is sent, $modx->getChunk(), and only html comes in response, tags are not parsed. Tell me please, where did I mess up?
Moreover, even such work with a chunk returns only html:

$chunk = $modx->newObject('modChunk');
$chunk->setCacheable(false);
$chunk->setContent($string);
$output = $chunk->process($options);

UPD
Now I'm generally at an impasse. It's not about Ajax, if you just open
s7535.h7.modhost.pro/ajax.php
Then in the same way no tags will be parsed. Although api is connected, I can work with modx in a script..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2016-11-27
@BloodVIRUS

The modx.pro guys will answer you faster. The craftsmen are all there, although they are not willing to help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question