Categories TYPO3

TYPO3 first encounter

Post date November 8, 2020

I like WordPress. Really. Maybe because I got used to it and understand how it works, maybe because it is rather simple to extend (you grasp the idea of add_filter and add_action and you’re ready to go) or maybe because it comes with lots of sensible defaults. However, this post is not about WordPress, it’s about another content management system I faced recently – TYPO3.

Setup

To be fair I would say setup process was rather uncomplicated. After installing required php extensions I got to see my brand new TYPO3 backend surprisingly quickly.

I admit I ignored 3 warnings displayed during installation process and did not increase php execution time from 30s to 60s, did not increase number of form fields from 1000 to 1500 and did not increase maximum nesting level from 256 to 400. I thought “I know what these variables do and I don’t expect their current values to cause any trouble, so I ‘ll spare myself time searching through config files and setting recommended values”. Well, it did not pay well quicker than I thought, but I’ll get to this later.

Hello world!

TYPO3 dashboard

With backend setup finished I decided to get myself simplest home page ever with huge “Hello world!” in the middle of the screen and nothing else. Sounds simple, but execution was much more complicated than expected – I think it’s the definition of enterprise.

Output? What output?

Creating new page and setting heading value was the easiest part of the task. I decided to ignore 6 tabs and lots of inputs looking at me from there, because I did not really understand their purpose. Some access rights config, language menu, even though I did not install any language packages and none were delivered with standard installation, some layout related looking stuff, even though the system did not provide any templates. All I wanted was a heading, so I have put the text in field labeled “Header” and saved.

Now I wanted to see something in my browser and things got complicated. TYPO3 does not come with any default HTML output. If you want to see something, you need to buy a theme or code it. I’m a developer so I’ve chosen the second option.

Writing an extension

Luckily for me, there is a tutorial for writing my first template. That’s good, let’s give it a try.

Following tutorials is nice until you make your first mistake – typo, file saved in wrong directory, whatever. If things work because of convention and you somehow do not get it, things don’t work at all.

TYPO3 is not forgiving and does not come with helpful error messages, so if you misspelled something you gonna have some bad time searching for the error. And one more thing – backend is built with lots of ajax calls, so hitting refresh button will force you to click through the interface again and again to see if your extension finally appeared on a list or not. Ugh. And on top of that there is built-in cache. If you miss it, you may not see your changes at all. To deactivate cache you need some understanding of the system, so in the beginning you’re stuck with flushing the cache manually.

But, hey, at some point the extension started working, so the tutorial was not that bad in the end. In the meantime I discovered typoscript – a programming language (?) you cannot really use to program anything, but you can use it to configure stuff. You know, nested objects with lots of attribute- value pairs. Sounds like JSON? Well, I can easily imagine using a JSON here, but JSON is not enterprise, so you need to go with this fancy JSON-like thing.

Typoscript & Fluid

When you get your HTML templates right and put your content together in CMS you need to somehow tell the system how put the second into the first to create a website.

Number of places you can put your configuration in is greater than I imagined. There are multiple files in my extension’s directory tree to do that, all levels of templates and pages. Sound like fun to debug, so I decided to put everything in one file for now and hope for the best.

I cleared the cache, hit refresh and …

You have been warned

Did I mention, that I ignored some warnings during installation? Well, they just took their vengeance.

TYPO3 error message

So I’ve learned the hard way, that outputting simple text on the screen is a complicated task requiring more that 256 nesting levels… I increased the limit and this time (after flushing the cache) it worked! Yay.

A side note: my content got an autogenerated link (/autogenerated-1) and I had to change it manually to get the content directly under my domain name. Otherwise my test domain displayed only errors.

TYPO3 error message

Adding more content

After my first success I decided to go further and add a second block to my awesome start page – text with images. I did not get how all listed elements should be used, because for me “Bullet List” is a “Regular Text Element” and distinction between “Text & Images” in one box and separated “Text” and “Images” blocks seemed vague, but I can read the documentation later,. For test purposes any block of content is good.

TYPO3 content elements

After saving my element and switching back to frontend I saw my text and my image. That’s good. However, I remembered, that I have read once, that “HTML purists may find that “fluid_styled_content” generates too much markup.” in another tutorial and decided to have a look.

TYPO3 generated markup

I would say I am quite close to an HTML purist. I avoid unnecessary elements as much as possible and sigh loudly when I see too may wrappers. That’s exactly what I did at that point. Seven wrappers to display some  text with image? Seven? Really? But why? To get an image centered? Don’t we really have flexbox to do it with one wrapper? Or grid if we want to do stuff with whole image gallery? And why wrap every heading in a header element? Why have multiple headers in one article?

For a system, that does not deliver any default template, this is at least weird for me. And it’s enough for one day.

Summary

My first encounter with TYPO3 does not make me really optimistic about the system. There are many things I consider not intuitive (writing php configs (typoscript) in admin area, weird content types, lots of inputs for content mixing editorial , admin and design stuff) or tiresome (the sheer number of clicks to get anything done). I would be much happier if page refresh worked as expected and not bring me back to dashboard every time or if HTML output was less verbose. Standard link generation surprised me as well. On the other side, what I liked, was the beginners tutorial and page speed in general (even after flushing the cache). Maybe one day I will give it another chance.

 

Leave a Reply

Your email address will not be published. Required fields are marked *