Hello Everyone,
I am freshiee in typo3. I need a solution for updated typo3 version from 8.7.32 to 12.4.9 then after some js is not loading and it’s showing 403. Please see the attached screenshot and Please help me.
Thank you.
Hello Everyone,
I am freshiee in typo3. I need a solution for updated typo3 version from 8.7.32 to 12.4.9 then after some js is not loading and it’s showing 403. Please see the attached screenshot and Please help me.
Thank you.
Hi Smit!
Welcome to TYPO3!
If I understand you correctly, you are saying that the JavaScript is located within an extension’s Resources/Private/
folder. JavaScript should be located within Resources/Public/
, for example Resources/Public/JavaScript/
.
You may also find additional help in this recent post:
I hope this helps. Please let me know how it goes and don’t hesitate to ask questions.
Best wishes
Mathias
Hello Mathias
Good Afternoon!
I have already done this work but the java script is not proper working on the page and as you suggest the errors are also gone.
Hi Smit!
Good to hear the errors are gone.
If the JavaScript is loading correctly on the page, but the script itself is not executed as it should, that sounds like an issue with your JavaScript code. You’ll have to debug that.
Best wishes
Mathias
Hello Mathias,
The JavaScript id already loading in live site but I select same path and so on on staging then it goes wrong and there is no issue in the script code.
After the version update 8.3.32 to 12.4.9 of typo3.
OK. Let’s see what we can figure out.
Some follow-up questions:
Best wishes
Mathias
Hello Mathias
Also I have some concerns regarding to the dropdown menu or the custom extension.
Hi Smit!
OK. Since everything works on the live site running v8, let’s focus on the staging site running v12.
As I understand it, your scripts are not loading correctly in TYPO3 v12, and you’re still seeing the 403 error.
Do the script URLs that give you the error go to a file within the /_assets
folder or are they pointing to a file within typo3conf/ext/
?
Best wishes
Mathias
Hello Mathias
Good Morning!
The JS are as path of
typo3conf/ext/webtemps/Resources/Public/Build/JavaScript
Now I am not getting 403 error but the actual JS are working on the live and the similar the staging is not working.
Hi Smit!
That the live site is working is quite natural, as it’s running TYPO3 v8 and hasn’t been upgraded yet.
TYPO3 v12 introduced a new folder structure for public assets in Composer-based installations.
That your JavaScript URLs still begin with typo3conf/ext/
in TYPO3 v12 indicates that the URLs are somehow hard-coded. The URLs should start with _assets/
.
In Composer-based versions of TYPO3 v12, the typo3conf/ext/
folder is no longer used. Instead, all Composer dependencies are located in Composer’s standard vendor/
folder, where files are not publicly accessible.
TYPO3 tells Composer to create symlinks from files in an extension’s Resources/Public/
folder to locations within the publicly accessible _assets/
folder. That’s the only way for example JavaScript files can become publicly accessible, and it happens automatically during Composer’s install operation (or whenever you run composer dumpautoload
).
Getting a 403 (forbidden) or 404 (not found) error on URLs to files within typo3conf/ext/
is correct in TYPO3 v12. URLs to files within _assets/
should not give errors.
Please check your code to see where the erroneous typo3conf/ext/
URLs come from. @krueml has written an article about how to generate correct URLs in TYPO3 v12.
Let me know how that goes!
Best wishes
Mathias
Hello Matias
Thank you for the guidance but we don’t install the setup we are just updating the setup of the typo3 v8.7.32 to 12.4.9 in sequence. So we are unable to get the public or config folder structure as typo3 define.
Please guide us from where we can get the exact path.
Below is our project directory where the composer.json & composer.lock is available
/www/htdocs/w0198596/emmingen-liptingen.eu/typo3_src-12.4.9
Hi Smit!
You’ll have to change some configurations when you upgrade. And you’ll have to have access to change any custom code that is incompatible with newer versions. Otherwise your upgrade will never work.
It sounds like you’ll need to have a chat with whoever gave you this project.
Best wishes
Mathias
Hello Mathias
Good Morning!
Thank you for your guidance. Can you provide me the differences of the ts files between v8 to v12.
Also I am stuck if the 8th version extension is activate on version 12. We know this is due to compatibility but we can’t get any error for that or any files specifically could you please guide from where we can get the solution to activate the extension.
Hi Smit!
I understand that you want to finish the project, but please heat me out.
I really think you should contact your client. Your upgrade will never work as long as you don’t have access to the necessary files. This might also be a too complicated project for someone new to TYPO3. Like with all learning, it’s best to take it step by step.
Normally, a TYPO3 developer who doesn’t know a particular installation very well will start by setting up a development environment on their local computer, and then copy the site and upgrade one version at a time, always getting each version up and running before upgrading further.
The ts files are what we call TypoScript files, and there are usually very few breaking changes between each TYPO3 version. Any breaking change is documented in the changelog. Here’s the changelog for TYPO3 v9: ChangeLog v9 — Core main documentation
TYPO3 also comes with an extension scanner for detecting incompatibilities, and many developers use TYPO3 Rector to automate part of the code changes.
However, upgrading TYPO3 or any other project with custom code (and probably some technical debt) requires a certain level of familiarity with the system. I recommend that you start out with setting up websites and basic extension development before trying your hand at upgrades of existing sites. This will also be the best thing for your client.
To say it in other words: Learning to swim is best done where your feet can touch the ground.
Best wishes
Mathias