Hashtag TYPO3Flag

Thanks to Oliver Klee I am now the proud owner of a TYPO3 flag. With the old logo!
Now I just have to dig out a wall where I can mount it. That will be a task, since my home office is in the attic, whose walls are all completely plastered. I think I will be kicked out if I try to attach the flag with drawing pins or something similar.

Nonetheless, I don't want to keep the flag forever. I have in mind that the flag will travel to another TYPO3 enthusiast every three months and I will record the journey here (if the recipient agrees). I am curious if anyone is interested in the flag and the idea at all. I suggest that people can contact me in any way: as a comment in this article, as a reply from this mastodon toot (I don't like this word at all) or even by email. I will collect everything and announce the hopefully lucky winner at the end of January, who will receive the flag from me at the beginning of April (I will ask for the address).

It tweeted out

I signed up for Twitter more than 14 1/2 years ago and for me it was the most beautiful and above all the most useful form of a social network. Not only could you follow interesting people or fun accounts, but you could also follow bots that flushed important tweets into your timeline. I have never used the web interface, but have always used Tweetbot as a client on all my systems. An excellent piece of software and it is hoped that there might be a Tweetbot for Mastodon in the near future.

But for me, Twitter is the end of it. I'm quite inconsistent and won't delete my account for the time being, I have to process the pain of my separation first. ;-) But I definitely won't post anything there anymore, or even feel the urge to miss something there. Too much has changed there in the past few weeks in terms of the apparent alignment of the network. If it is now possible for the boss to personally conduct surveys on his account (and thus his filter bubble) about far-reaching decisions, that is no longer consensual for me.

Mastodon feels quite nice, the decentralized architecture gives hope that no power structure can arise that could endanger the entire network. We'll see.

Meigs Field

Almost forty years ago, I did my first laps in a flight simulator here and was fascinated by flying then as I am now. In that case, I can really say: Thank you Microsoft!

Ajax request via dedicated page type

Because there are so many old pages floating around on this internet with a now faulty example of how to handle ajax requests via a dedicated page type in TYPO3 and I stumbled across it again today as part of a code refactoring, I want to do my part help dispel the assumption that the associated PAGE object needs to be mishandled via config.no_cache = 1. Because it doesn't have to. And it shouldn't either, because if you look at your log, you'll see a lot of warnings like "$TSFE->set_no_cache() was triggered. Reason: config.no_cache is set. Caching is disabled!".

And we don't want that. It is sufficient to integrate the content of the page as COA_INT or USER_INT. Because these objects are definitely not cached!

ajaxPage = PAGE
ajaxPage {
    typeNum = 123456789
   
    config {
        disableAllHeaderCode = 1
        admPanel = 0
        debug = 0
    }
   
    10 = COA_INT
    10 < plugin.tx_extensionname_pluginname
}

Or also with a different version

ajaxPage = PAGE
ajaxPage {
    typeNum = 123456789
    
    config {
        disableAllHeaderCode = 1
        admPanel = 0
        debug = 0
    }
   
    10 = USER_INT
    10 {
        userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run  
        extensionName = ExtensionName  
        pluginName = PluginName  
        vendorName = VendorName  
        controller = ControllerName  
        action = ajax  
    }
}

Snap has no updates available

If you write things down, you should be able to remember them better. And since I have to search every time the Ubuntu Updater says it can't install software from the wizard, I'll write it down:

killall snap-store
snap refresh

Adjust TYPO3 backend in five minutes

In the decision-making phase for choosing a content management system, one often hears about TYPO3 that the backend is not intuitive and much too overloaded for the editor. That there are too many options and fields that you would not use when creating content and lead to the editors being overwhelmed.

I have also seen many backends in which the backend was not adapted for the editors or even no user groups with corresponding roles were used. And thus all users with administration rights were on the go in the backend.

In my opinion, this has to do with the steep learning curve of TYPO3, which puts obstacles in the way of beginners. But once you understand the concept of configuring TYPO3, all doors are open to making the backend as simple as possible. And only with the fields and options that you need to create content.

There is a fairly simple way to achieve this: hiding fields using TCEFORM, setting default values ​​for fields with TCAdefault and consistently using user groups. Admins are really just admins and not to be used for creating content. With a properly set up TYPO3, you should never have to log in with an administrator account. ;-)

Read more

Blogging with TYPO3

Comparisons between content management systems are a dime a dozen, so I don't want to make another one now. Especially because I find it hard to create an appealing comparison without a specific problem.

So let's assume that we already have a TYPO3 installation and the desire arose to integrate a blog into a site as well. Simplifying and to make it easier to follow, this installation uses bk2k/bootstrap-package with its own template extension (where does the term SitePackage actually come from? In the ext_emconf there is "template" in the parameter "category", isn't there?).

After installing the blog extension of TYPO3 GmbH, you simply follow the setup wizard from the documentation and integrate the whole thing into your template extension with a little TypoScript and TsConfig. All this takes no more than a quarter of an hour if you are a bit familiar with the backend. And it's not worse than installing and configuring any other blog software.

Afterwards you get a page structure in which you can let off steam. In which you can edit pages and their content as you are used to with TYPO3. Content that can be used in multiple languages, an instance in which you can maintain other pages/domains with completely different content in addition to this blog. Together with many other users, if you want. Draw from the pool of a thousand other extensions to prepare and present your content.

Sure, maybe I'm biased, since I've been working with this system for a decade and a half, but I don't know why it's hard to install TYPO3, the bootstrap-package and the blog-extension via composer and then let the wizard create the page structure. A WordPress installation takes just as long and provides me at first also no more functions. Sure, as soon as I then somewhere from a theme with such a page editor reingklicken have, which admittedly really creates any technically uninitiated, WordPress has perhaps its advantages in terms of design. You can see it on this page (I'm just not a pixel pusher ;-) ).

And now I have yet brought in a comparison...

Pagan

Roleplaying games have always been my hobby somehow. My "Pen & Paper" time is also eons ago, in which we enthusiastically first played Das Schwarze Auge and AD&D and then, in addition to Shadworun, Star Wars (yes, there really was once a roleplaying system for), Plush, Power and Plunder also passed stat battles with the Rolemaster rulebook. And there have always been roleplaying games on the computer. On the C64 I had little contact with it, although there were games like Bards Tale. But the fascination really came with the first part of the Sternenschweif trilogy of the Das Schwarze Auge or with the Pool of Radiance series, which was played on the IBM PC.

But I also loved the Ultima series (especially Ultima VII). And actually wanted to play that again. But it's aged really badly. Above all, you just can't read the yellow text on the background anymore without panicking that you'll have to get new glasses at the optician in the next few days. But on the pile of shame of never finished games, there's also the successor Ultima VIII Pagan. Although the game didn't get good reviews because of its game mechanics, I still remember how I spent nights playing it. And I cursed when I had to master another jump'n'run passage.

I'll see how far I get this time.

Give the code statics

Yes, I know, statics and static code analyzer has nothing common in the first place, but at last will code be better by using them. Harder. And so they contribute to a solid code structure that makes our applications more stable and better.

Roland Golla writes in the edition 5.2021 of the Entwickler Magazin: "Legacy code makes sick." His article is about PHPStan. How you integrate this static code analyzer in your development environment (and that doesn't mean your IDE only), not only to identify undiscovered sources of error but to improve your skills and your knowledge as developer.

You just can't know everything, development in PHP takes place in ever shorter release cycles. On the other hand, the customer's aging application is maintained. Every developer has to cover an enormous range of features that are made available by the PHP version used in the respective project.

In my opinion, the unbelievably beautiful and always fascinating thing about being a software developer is that you learn something every day. Really every day. And tools like static code analyzer can help. I think everyone knows the feeling when you look at code from three, maybe four years ago, shake your head and then after a courageous "git blame" would like to sink into the ground when you realize that you have produced this legacy code yourself.

Static code analyzers start with the first development and help you to write a lot of clean code. They don't necessarily help you to write better program logics, so you can still nest the business logic so uselessly and implement it difficult to understand. But hey, there are other tools like Performance Profiler (Blackfire etc.) that you can throw at this problem.

I can only recommend tools such as PHPStan, rector, Psalm etc. to anyone, in addition to the tools such as PHP-CS-Fixer or PHPMD, which have hopefully been used for years. To analyze code, refactor it, and most importantly, learn. Quasi as pair programming with a tool and not with another developer. Or as a code review before the actual code review.

Disclaimer: Roland Golla made the above-mentioned edition available to me free of charge, for which I thank him very much. I've lost sight of print products for a long time when it comes to programming or topics on the web. But once again it was a wonderful experience to have paper in hand while reading. I will not make a subscription now, but if I should ever travel by train or something again, I will look for such magazines at the station kiosk. Otherwise, I can recommend his YouTube channel "Never Code Alone", which I follow regularly. His videos are mainly about testing, refactoring and general topics about being a developer.