Comments (10)
Thanks for the report.
Please elaborate.
What kind of action is the one that generates the URI via {h:uri.ajaxAction()}
, cached or uncached?
To what kind of action is the Ajax URI generated for, cached or uncached?
e.g. like this: listAction
(cached) has a template with {h:uri.ajaxAction(action: 'detail')}
and detailAction
is uncached.
Are all actions within the same plugin?
Can you provide code to reproduce?
from typoscript_rendering.
Hi,
Thank you for fast answer.
I'm rendering an URI from uncached to cached action, both within same plugin and controller.
One thing to take into account: I'm using an own View for an ajax-Action.
To make it easier to reproduce, I've created a test extension: https://github.com/InvisibleKind/my_ajax_test
In current state, the link is built by uncached init
action to cached ajax
action, and leads to result, described in an issue above.
But If you add ajax
to a list of uncached actions, then the output is as expected.
from typoscript_rendering.
To make it easier to reproduce, I've created a test extension:
awesome, thanks. But can you actually reproduce this error with your test extension?
I set up a blank TYPO3 8.7.1 instance (PHP 7.1) with just typoscript_rendering and your test extension and everything works as expected. What do I miss?
from typoscript_rendering.
So you're receiving only ["myValue"]
as HTTP response body?
Then it is strange. There is nothing special in my installation, it is a composer-installed version, which runs in nginx/php-fpm Docker setup, if that matters.
Here is a bit anonymized composer.json
{
"name": "name/name",
"description": "Description",
"license": "GPL-2.0+",
"minimum-stability": "stable",
"repositories": [
{
"type": "composer",
"url": "https://composer.typo3.org/"
}
],
"config": {
"vendor-dir": "vendor",
"bin-dir": "bin",
"cache-dir": "composer-cache",
"github-oauth": {
"github.com": "token"
}
},
"require": {
"php": "~7.1",
"typo3/cms": "^8.0",
"fluidtypo3/vhs": "^4.2",
"helhum/typo3-console": "^4.5",
"helhum/typoscript-rendering": "^2.0",
"phpoffice/phpexcel": "^1.8",
"dmitryd/typo3-realurl": "^2.2",
"koninklijke-collective/my-redirects": "^3.3",
"ichhabrecht/content-defender": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "5.7.*"
},
"extra": {
"typo3/cms": {
"web-dir": "web"
},
"helhum/typo3-console": {
"install-extension-dummy": false
}
},
"autoload": {
"psr-4": {
"My\\MyAjaxTest\\": "web/typo3conf/ext/my_ajax_test/Classes/"
}
}
}
from typoscript_rendering.
Thanks. Please try to reproduce it yourself in your environment, but a blank TYPO3 installation.
So you're receiving only ["myValue"] as HTTP response body?
yes
from typoscript_rendering.
Sooo... Finally I've found a reason. Tried almost the same setup with Laravel Homestead, and it surprisingly worked for me. So I've started to play around with Xdebug and phpStorm, and after long session, I've discovered, that problem is in \TYPO3\CMS\Frontend\Http\RequestHandler::handleRequest()
and following block:
$this->controller->generatePage_preProcessing();
$temp_theScript = $this->controller->generatePage_whichScript();
if ($temp_theScript) {
include $temp_theScript;
}
In case of Homestead, if was returning true
. In case of my initial setup - false
.
The problem is, that \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::generatePage_whichScript
gives null
because I'm setting $GLOBALS['TYPO3_CONF_VARS']['FE']['noPHPscriptInclude']
to true
in my LocalConfiguration.php
.
Quick fix would be set noPHPscriptInclude
to false
, but generatePage_whichScript
is marked as @deprecated
so we need some long-term solution.
Do you have any ideas for it?
from typoscript_rendering.
Quick fix would be set noPHPscriptInclude to false
hm, ok. Good catch. Can you create a pull request for this?
generatePage_whichScript is marked as @deprecated so we need some long-term solution
true
Do you have any ideas for it?
no, not yet. But I talked to @bmack already, that we will need something in TYPO3 9.x.
In the best case things like that will work out of the box, but we have to see what can be done for this TYPO3 version
from typoscript_rendering.
Sorry, took me too long to get how to properly write functional test to catch this situation, but finally PR is there ;)
from typoscript_rendering.
Ok, now the build fails for TYPO3 7 und lower with exactly same test failure, which should be fixed. Going to reproduce it locally and put me head on it.
from typoscript_rendering.
Now finally done :)
Short question though: can I somehow execute the codestyle-check locally before push?
from typoscript_rendering.
Related Issues (20)
- PHP 7.2 compatibility HOT 6
- Typo3 v9 compatibility HOT 5
- additionalParams doesn't work in AjaxActionViewhelper HOT 2
- "Real" json response HOT 4
- Content Type in Cached Output HOT 8
- Ajax Pagination in News doesnt work HOT 6
- Additional query params HOT 4
- Is pageNotFoundOnCHashError requirement really .. required? HOT 10
- How to change the URL without reloading a page? HOT 1
- Question: version 2.1.0 and php 7.3 HOT 1
- AJAX-based pagination in the 'ext:news' works not respecting category and tag HOT 5
- uri.action and valid JSON - no "Cached page generated"
- ...\Widget\LinkViewHelper::render not compatible with ...\AbstractTagBasedViewHelper::render()
- version 2.2.0 should actually be version 3.0.0 HOT 4
- TYPO3 Security Update 10.4.14 breaks typoscript_rendering partially HOT 4
- Uri/CObjectViewHelper still uses TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper HOT 1
- TYPO3 v11 compatibility HOT 3
- PHP8 error with content-type reading HOT 2
- Ajax response always contains complete page html HOT 4
- TYPO3 v12 compatibility HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typoscript_rendering.