1

I've been bumping into a field limit when attempting to mirgrate fields in, which is a massive limitation for the way the site was originally set up.

I've read a bunch of other threads where it's suggested changing the table to barracuda and dynamic

I've added this to the mysql conf:

innodb_file_per_table=1
innodb_file_format = Barracuda
innodb_log_file_size = 512M
innodb_strict_mode = 0

And I've ran ALTER TABLE craftcms.craft_content ROW_FORMAT=DYNAMIC

I've confirmed that this has all been updated in INNODB_SYS_TABLES and GLOBAL_VARIABLES in the information_schema, but it doesn't seem to make any difference.

Just as a test to see when I hit the limit, I've added a load of test plain text fields - the result is 219 custom fields:

  • 125 TEXT
  • 51 VARCHAR(255)
  • 37 TINYINT(1)
  • 4 VARCHAR(2000)
  • 1 TINYINT(2)
  • 1 DECIMAL(3,1)

I appreciate that refactoring some of the data structure is the way forward, but given that migrating the data won't be an easy task, I'd obviously prefer if there's some database solution to mitigate this issue quickly.

Any suggestions?

5
  • I don't have an answer for you and it looks like you've got a solid grasp on the problem already. Worth mentioning that as part of this (github.com/craftcms/cms/issues/1524), that would involve having a content table per field set (instead of lumping them all into craft_content), which would alleviate this type of thing going forward.
    – Brad Bell
    Jul 5, 2018 at 21:45
  • Whilst that does sound like a great idea, it looks like that's currently scheduled for Craft 4.0? So as of Craft 2.6.X is the answer just delete a lot of fields and slowly migrate content into something like Super Table to group the content in separate fields?
    – Jammooka
    Jul 6, 2018 at 7:34
  • Yeah... Super Table or Matrix. Wish I knew of a better answer.
    – Brad Bell
    Jul 6, 2018 at 18:36
  • I run into the same problem on a website with a lot of custom fields. Disabling strict mode in mysql and increasing the log file size to 512MB seems to have fixed the issue so far. Hopefully the aforementioned enhancement will address this issue in a better way. May 17, 2019 at 14:03
  • If it helps, I found the easiest way to get rid of fields was to just group similar fields. So for example, all my globals are now in super tables entitled "links", "ctaFeatures" and "globals". Then we use neo so for each block type I have a content tab and a settings tab and the settings are grouper in super tables - background, text colour and border colour, for example.
    – Jammooka
    May 19, 2019 at 9:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.