TYPO3 REST Extension setup - rest

I'm trying to setup the REST-Extension v2 in TYPO3 8.7 following this tutorial. I included the 2 templates called Virtual-Object-Page and Virtual-Object-Content in my template. I made a new extension using Extension Builder 8.7 from Github with a simple model. I installed the new extension and made some Instances of my model in the List View on my start page. In the Typoscript of my template I added:
plugin.tx_rest.settings.paths {
1 {
path = me-kinder-child
read = allow
write = allow
}
}
Me is the Vendor, kinder my extension key and child is my model.
When I'm calling http://localhost/rest/ I get The requested URL /rest/ was not found on this server.
What am I missing?

The path in the setup is explained being possible with several options, so perhaps try different configuration, possible is also all.
I don't see a fault in your setup, so the fault might be related to the server-file .htaccess or the extension realurl respectively the combination of both perhaps.
If you try it already with realurl or cooluri then disable that to get it running without first.
The htaccess file you can disable first too and enable it later again to adjust all requirements to each other.

The problem was not about RealURL was missing in any way. I just did not clear a cache that got cleared while installing RealURL. I guess that the "Clear all caches"-button in the Install-Tool would do it too.

Related

DDEV accessing wrong .css-file, different home base the productive system

I'm working on a downloaded productive TYPO3 homepage (v11.5) and set it up in DDEV.
Now during my work I recognised that the base href for inclusion of user-specified .css-files are different from the productive system.
While in the productive system, the .css-file is correctly loaded from
https://mydomain.at/fileadmin/templates/assets/css/mybootstrap2.css?1636470015
it is in the DDEV environment requested from
https://mydomain.ddev.site/sternwarte-mydomain/fileadmin/templates/assets/css/mybootstrap2.css?1674722424
Which obviously added a Typo3 page references (sternwarte-mydomain/) to the path, an therefore correctly resulted in an
net::ERR_ABORTED 404
for the GET-operation as this is the wrong location.
Any hints/suggestions where my error could be.
EDIT:
Extract of the Typoscript.
Resulting sourcecode
EDIT 2:
Site configuration:
Maybe you need to set config.absRefPrefix = / in TypoScript? Or check the entry point of your site configuration.
Update:
Try to set the link to the CSS file with a slash in front, e.g. file1 = /fileadmin/templates/assets/css/mybootstrap2.css. Or try to set config.baseURL = /.

realurl prevar language and get parameter

I have a strange problem:
TYPO3 7.6 with realul 2.2.1
I got a page with a form. One field of the form gets prefilled via get-parameter (sysid=xxxxx).
The site is multilanguage: german->0, english->1, mapped via prevars '' and en.
When I call the page via www.domain.tld/form-page/?sysid=xxxxx I can fetch the get parameter and fill the field.
When I call the page via www.domain.tld/en/form-page/?sysid=xxxxx I get a 404. That's weired because www.domain.tld/en/form-page/ works without any problems.
I tried several settings (e.g. exclude sysid from chash generation) but nothing worked.
Any hints what I could do?
One additional note: the getvar links are not generated in TYPO3, the are called via barcodes.
I cannot reproduce your problem on the same versions of T3 and realurl.
And I guess (wild guess), it is not a realurl problem, but a TYPO3-core problem.
Could you try calling the page via:
www.domain.tld/index.php?id=XX&L=1&sysid=xxxxx
Furthermore investigate and tell us your settings of
[FE][pageNotFound_handling] and according (installtool/LocalConfiguration).
Nevermind. Error occured because I didn't adjust the realurl-setting for the domain after moving to live. Therefore automatic configuration took place and that didn't work. With manual conf it works.

Configure TinyMCE in Typo3 to run over HTTPS

we are using Typo3 7.6.6 for our new homepage. To simplify the process of writing new articles, we introduced the extension TinyMCE4 as TYPO3 RTE. On our test-system tinyMCE works fine, the editors are satisfied.
To prepare for production environment we introduced SSL. Hence the homepage is referenced over https://....
Since this change tinyMCE no longer appeared. After some research we found out, that the tinyMCE extension tries to load a specific dynamically generated js-file tinymceConfiguration....js over HTTP (not over SSL as preferred).
Since we have a strict policy, the server doesn't allow the client to catch the script without using SSL. Unfortunately we cannot change that policy.
The question is: where does the extension get the URL from. Can I overwrite it to reference the https://.. path?
I already tried changing
config.baseURL
tinyMCE.init({
...
document_base_url : "https://.."
});
But it didn't work.
Does anybody have an idea?
Regards,
Thomas
you could try to tell your browser to use "Content-Security-Policy" in that way all http links are rewriten by the browser itself. Maybe the lazy way.
https://developers.google.com/web/fundamentals/security/encrypt-in-transit/why-https?hl=en
http://www.html5rocks.com/en/tutorials/security/content-security-policy/
Regards
Pete

In TYPO3 6.x, how to get defaultJS, when config.disableAllHeaderCode is enabled?

I set config.disableAllHeaderCode = 1 in my recent TYPO3 sites, as I want full control over the page template.
But this not only throws out the html tag etc., but also the default Js (which could be used to uncrypt mailto-Links.
One solution would be to copy this TYPO3-generated JS from the core code and insert it manually. Very simple: just set config.disableAllHeaderCode = 0, load the page once, copy the js, done. But, in case of an update or settings change, this might break.
So: is it possible to access this "default JS" via typoscript and assign it to the PAGE object?
Have a look at https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/frontend/Classes/Page/PageGenerator.php. You will see that the spam protection code is hardcoded and only added to the page output if config.disableAllHeaderCode is not set.
Therefore I don't see a possibility to do that. Therefore the answer seems to be no, unless you XCLASS the PageGenerator. I would just copy the JavaScript code; I'm using TYPO3 for some years now and wouldn't remember that the spam protection code ever changed.
There is a solution I think. Go to /typo3/sysext/cms/tslib/templates. There is a file tslib_page_frontend.html. This file is responsible for rendering the whole page including the head. You can define a new path to the above mentioned file. For example set the following code:
config.pageRendererTemplateFile = PATH_TO_YOUR_THEME//Resources/Private/Core/tslib_page_frontend.html
respectively
page.config.pageRendererTemplateFile = PATH_TO_YOUR_THEME//Resources/Private/Core/tslib_page_frontend.html
The new template file can look like the following small snippet:
###JS_INLINE###
###BODY###
That way the inline JS is still rendered (and I think the spam protections JS is inline JS - which can be stored in external files).

extension on typo3 page

I have created a page in typo3. Created and install extension through Extension kickstarter. Add this newly created extension on my page. But the extension is not showing up. Do anyone has any idea? Is template file needs to be defined?
Make sure you have included the Typoscript of the extension as well.
Usually it's done via 'Include static', the installed extension should be within the available items.
I added this line on the setup template of the page and it resolves my problem
page.40 < plugin.tx_test3_pi1