Klaus

TYPO3 Console: A CLI tool for TYPO3

 Fri, 07 Jul 2017 17:40:12 +0200 
nice tool when you work with #TYPO3.

TYPO3 Console: Getting things done
The TYPO3 console is a great tool in order to get things done quickly. It provides many commands that will ease your live with TYPO3 a lot. Even if you are not used to command line tools, you should, no, you must have a look at this post.
 tools  TYPO3
Klaus

Dockerized

 Fri, 09 Dec 2016 19:02:47 +0100 
Nearly all web projects are moved to #Docker containers now. The old infrastructure was mostly based on CentOS6/7 and the main reason for this step was the annoyance of legacy #PHP projects and their PHP version requirement conflicts. I don't need a cluster or swarm, so I have a single instance with #CentOS based #Project Atomic only. The dockerized projects include:
static pages with nginx
#TYPO3 7.6
#Drupal 8.2
#Piwik 2.17
#Revive Adserver 4.x
#OXID eShop 4.[9|10]
...

Here are some completely subjective "best practices":
  • I was a bit disappointed about most available images in Docker's Hub. But make use of the official mariadb, php, drupal, nginx images!
  • Use your Dockerfile and no massive entrypoint scripts.
  • Don't try to build a base images for all your projects, the projects have all too different requirements. Found it much easier to build custom images from the official PHP images directly with only what was really needed for the projects.
  • Think about mail delivery requirements. Does your application requires mail(), or can you configure a SMTP server. Use sSMTP if you need a local MTA.
  • Get your persistent volumes right and use the correct #SELinux labels.
  • A local repository makes deployment much easier.
  • Use #Jenkins to build and deploy new images.
  • Don't use --link, use Docker networks instead!
  • jwilder/nginx-proxy still has some bugs, especially with custom nginx configurations, but a wonderful tool.
  • jrcs/letsencrypt-nginx-proxy-companion and it was never easier to get certificates.
  • Think about reboots. How you want your containers to be managed? Services for systemctl work quite well so far.
  • Redirect your application logs to the right output. Log management I should take a look at again.

Should also get my private projects into containers next.
Klaus

Configuring Suggest Wizard through TSconfig

 Bonn, GermanyFri, 07 Oct 2016 17:48:34 +0200 
Even after years working with #TYPO3 I am still impressed by the amazing and powerful configuration possibilities with #TypoScript. Just discovered a very elegant way how to configure the behaviour of the quick search fields in the backend when you want to link another content element.
On one page I want to change the behaviour of this quick search for a specific field in a content element and limit the results that can be searched.

To be concrete in calendar (extension: cal) event content elements (table: tx_cal_event) I want to limit the results that are available as locations for this event (field: location_id) which are queried from the table tt_address. I only want to get results that have set the field tx_cal_controller_islocation in the table tt_address. Of course you could edit the $TCA (Table Configuration Array) of tx_cal_event and change the definition of the suggest wizard globally, but there is a much more flexible and elegant way.

Just put this TSconfig in a PageTS or UserTS depending how you want this behaviour to be deployed, for example for a group of users only or a specific page only.
# Limit Location Suggest Wizard to cal-islocation addresses
TCEFORM.tx_cal_event.location_id.suggest.tt_address.searchCondition = tx_cal_controller_islocation=1



#^Wizards Configuration — Suggest wizard — TCA Reference 7.6 documentation
This renders an input field next to the selector of group-type fields (when internal_type is db) or of select-type fields (using foreign_table). After the user has typed at least 2 (minimumCharacters) characters in this field, a search will start and show a list of records matching the search word. The "suggest" wizard's properties can be configured directly in TCA or in page TSconfig (see TCEFORM properties).


#^TCEFORM ->TCEFORM_suggest — TSconfig Reference 8-dev documentation
Each level of the configuration overwrites the values of the level below it:
    "suggest.default" is overwritten by "suggest.[queryTable]".
    Both are overwritten by "[table name].[field].suggest.default" which itself is overwritten by "[table name].[field].suggest.[queryTable]"
suggest.default:
Configuration for all suggest wizards in all tables
suggest.[queryTable]:
Configuration for all suggest wizards from all tables listing records from table [queryTable]
[table name].[field].suggest.default
Configuration for the suggest wizard for field [field] in table [table name]
[table name].[field].suggest.[queryTable]
Configuration for the suggest wizard for field [field] in table [table name] listing records from [queryTable]
 TYPO3