TYPO3 v9.5.8 - 404 errorHandling works only on second level - How to fix it? - typo3

I have a really strange behaviour in my TYPO3 CMS v9.5.8
Inside the site settings i configured the errorHandler for 404 pages as follows
rootPageId: 1
base: 'http://www.example.com/'
[...]
errorHandling:
-
errorCode: '404'
errorHandler: Page
errorContentSource: 't3://page?uid=97'
when i now try to open http://www.example.com/foo (which does not exist) the Site shows me the root page (id:1, same as example.com).
BUT if I access http://www.example.com/foo/bar or http://www.example.com/foo/baz or any other non-existent second level site - then I see the configured 404 site (id:97).
What could go wrong here? How can get the "normal" 404 behaviour?
EDIT: I figured out, that foo can be both. Existent and non existent. The important thing is: before the non existent subsite (lvl 3, 4, 5, 6, ...), there has to be a domain (lvl 1) and at least a lvl 2 subpage.

Related

Why can't Jekyll Minima point to correct post's permalink?

I recently just set up a GitHub Pages. Hooray! This is very exciting for me.
I've been having endless issues with inserting the baseurl for the "post" layout; not for anything else (e.g. default, page). I have no idea why.
Here's the setup:
url: "https://[user].github.io" # the base hostname & protocol for your site, e.g. http://example.com
# this means to ignore newlines until "baseurl:"
baseurl: "/portfolio" # the subpath of your site, e.g. /blog
For "page" layout, I have the following:
---
layout: page
title: About
permalink: /about
---
# About page
This page tells you a little bit about me.
No issue - https://[user].github.io/portfolio/about
With a post, however, I've coded the following:
---
layout: post
title: "Space Race Project"
date: 2023-02-11 17:09:05 -0500
categories: excel
# permalink: /:categories/:title/
---
And the result - http://[user].github.io/python/pet-sales/
Why is it excluding the baseurl, "portfolio?" It leads to a 404 error.
Any help would be so appreciated.

TYPO3 6.2 / RealURL : 404 error with google tag in URL

On this website :
https://lessentiel.novethic.fr/blog/business-case-3/post/orpea-dialogue-de-sourds-face-a-lengagement-actionnarial-des-acteurs-de-la-finance-durable-810#scrollTop=0
Google Analytics add parameters for cross-domain-tracking to url so a working link like this one
https://www.novethic.fr/actualite/gouvernance-dentreprise/entreprises-controversees/isr-rse/les-sombres-dessous-d-orpea-ont-echappe-aux-filets-de-la-notation-rse-150534.html
become this, that lead to 404 error
https://www.novethic.fr/actualite/gouvernance-dentreprise/entreprises-controversees/isr-rse/les-sombres-dessous-d-orpea-ont-echappe-aux-filets-de-la-notation-rse-150534.html?_gl=1*1rw78bk*_ga*ODIzMDE2MTIuMTYzODE5MjUyMw..*_ga_FVLX79JNXC*MTY0NDQ4NjM1OC40OC4xLjE2NDQ0ODg2MDkuMA..#_ga=2.179165860.1898940241.1644433835-82301612.1638192523
Any tell TYPO3/ RealURL to ignore cross-domain-tracking parameters ?
_gl=11rw78bk_gaODIzMDE2MTIuMTYzODE5MjUyMw.._ga_FVLX79JNXC*MTY0NDQ4NjM1OC40OC4xLjE2NDQ0ODg2MDkuMA..#_ga=2.179165860.1898940241.1644433835-82301612.1638192523
Take a look into configuration what is set for the settings:
$GLOBALS['TYPO3_CONF_VARS']['FE']['cHashExcludedParameters']
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError']
In pageNotFoundOnCHashError you can define if the system throws a 404 when cHash parameters are not valid e.g. when a parameter was added but not handled in cHash. This is happening when an external service adds parameter like Google does in your case.
In cHashExcludedParameters you can define the parameters that are not used to validate the cHash.
There are 2 options now:
Set pageNotFoundOnCHashError to 0 (not so good solution as there won't be a 404 when someone tries to manipulate the parameters)
Add _gl to the list of cHashExcludedParameters (better solution as you whitelist the Google parameter and keep your system safe)

Play Framework returning 404 with play.http.context and trailing slash

I have a Play Framework application that serves an SPA. The routes file contains the following routes:
GET / controllers.Home.index
GET /index.html controllers.Home.index
# /api/* routes
GET /*file controllers.Assets.at(file)
controllers.Home.index serves the SPA's index after performing SSO routines.
When I run the application without any additional configuration, upon visiting localhost:3000 and localhost:3000/, the index action in Home controller is invoked as expected.
The problems start when I configure play.http.context:
When set to /my-app, requests to localhost:3000/my-app succeed; to localhost:3000/my-app/ return 404.
When set to /my-app/, requests to localhost:3000/my-app return 404; to localhost:3000/my-app/ succeed.
Is there a way to configure Play such that requests to both URLs succeed with controllers.Home.index?
I was looking for the same, but there is no good answer. For Play/Akka those are 2 different URLs,
Option 1)
is to define it 2x
GET /about controllers.HomeController.about
GET /about/ controllers.HomeController.about
Option 2)
redirect one url to another
GET /a controllers.HomeController.about
GET /a/ controllers.Default.redirect(to = "/a")
Option 3)
more advanced ways, but I did not testd it
https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/path-directives/ignoreTrailingSlash.html
https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/path-directives/redirectToNoTrailingSlashIfPresent.html
https://github.com/akka/akka-http/issues/880
Use both urls. With and without the trailing slash.

Can't retrieve crawling errors using Python client

A while ago (around 3 months) I used gsc api to retrieve crawl errors, but it does not work right now. Here is the code:
# oauth2flow <--- function implementing authorization
service = oauth2flow(name='webmasters', fname='path_to_client_secret', scope='https://www.googleapis.com/auth/webmasters', version='v3')
self.service.urlcrawlerrorssamples().list(
siteUrl=siteUrl,
category=category,
platform=platform
).execute()
The problem is that urlcrawlerrorsamples is not recognized (AttributeError: 'Resource' object has no attribute 'urlcrawlerrorssamples'). All other things like seachanalytics, sites work just fine. I have problem only with crawling errors.
Here is my package list:
google-api-core==1.11.1
google-api-python-client==1.7.9
google-auth==1.6.3
google-auth-httplib2==0.0.3
google-auth-oauthlib==0.2.0
google-cloud-core==1.0.1
google-cloud-storage==1.16.1
google-resumable-media==0.3.2

Sharing session (JSP) in 2 different project

is there anyway of sharing the Session data across two different JSP (i mean two dynamic web project)
projects
in the 1st project i test like that
<%if(session.getAttribute("UserName") != null ){%>
.
.
do something
.
<% } %>
it's ok
but when i do that in the 2nd project i got this exception
Etat HTTP 404 - /myEbookSearchClient/myEBook/WebContent/JSP/session/index.jsp
--------------------------------------------------------------------------------
type Rapport d''état
message /myEbookSearchClient/myEBook/WebContent/JSP/session/index.jsp
description La ressource demandée (/myEbookSearchClient/myEBook/WebContent/JSP/session/index.jsp) n'est pas disponible.
--------------------------------------------------------------------------------
Apache Tomcat/7.0.5
Basically, I'm jumping from a page in one to a page in another
any idea how to Shar the session of the 1st project with the 2 project ?
You cant. Attempting to share sessions is discouraged for a variety of reasons primarily related to security.
Servlet contexxt methods that retreieve a session by id or return an enumeration of all now all do nothing for precisely this reason.
You will need to share data in some other manner such as a cache or via a database.