Troubleshooting

Things go wrong and you don’t know why? Maybe this troubleshooting guide knows!

Error in backend after upgrading Mask

In some version upgrades Mask changes things, where a simple cache clearing is not enough. First of all try clearing the cache in Maintenance > Flush Cache. If you can’t access the module, delete the folder typo3temp or var/cache. Also try to deactivate and reactivate the extension if you have upgraded to v7.

Database Analyzer: Invalid default value

If you run the database analyzer and it complains about a column having an invalid default value then you should check a few things.

SQL_MODE

First check your SQL_MODE by running SHOW VARIABLES LIKE 'SQL_MODE';. There are some candidates that cause trouble when having a too strict environment in a MySQL server. These are for example text types, which might disallow default values per se or date types which might disallow 0000-00-00 values as default.

In order to fix this, remove the restrictions that cause this to happen. For dates it is NO_ZERO_DATE for example. Or just sweep them altogether by running SET GLOBAL SQL_MODE = '';.

Update tables

Else it just might be you are changing a fields definition when it’s already filled with values. In this case either completely delete the column and run the database analyzer anew or update the old default values with the new one. For example UPDATE tt_content SET tx_mask_field = 0 WHERE tx_mask_field IS NULL.

On save error: Row size too large

Explanation

There is a limit on how much can fit into a database row. When using overflow tables it is usually 64kb. As Mask uses the table tt_content, we can only work with the maximum size minus TYPO3 core fields (~9500 bytes). That leaves us with ~56kb. When using a utf-8 collation like utf8_general_ci, one character has the maximum size of 3 bytes. Meaning the maximum extra string fields are 73 (73 * 255 bytes * 3 = 55845 bytes).

Note

The number can vary depending on installed system and third-party extensions.

Other field types like int (4 bytes), mediumtext (3 bytes) and text (2 bytes) are very small in comparison. The reason text fields are so small is that they are always stored on overflow pages. Read this mariadb guide for in depth explanation.

Solutions

  • Try to minimize the usage of string, link and select fields. They all use varchar(255).
  • If possible, reuse exisiting TYPO3 core and Mask fields.
  • You can manipulate mask.json and set lower max values for varchar.
  • If applicable, use inline fields, as they create a new table.
  • Otherwise consider creating an own extension with custom tables if your Mask elements are getting too complex.