AcclaroInc / craft-translations

Easily manage your Craft CMS website translations and drive global growth with simplified translation workflows.
https://plugins.craftcms.com/translations
Other
9 stars 11 forks source link

Maximum row size error on install #432

Closed robmcfadden closed 7 months ago

robmcfadden commented 1 year ago

Getting the following when trying to install latest version of Translations plugin. I ran this query manually and was able to reproduce, then got it to run successfully by changing some of the varchar types to text.

Are you able to reproduce this?

PHP version 8.1.15 MySQL 8.0.27 Craft Pro 4.4.6.1

*** failed to install translations: An error occurred while executing the "acclaro\translations\migrations\Install migration: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
The SQL being executed was: CREATE TABLE `craft_translations_orders` (
    `translatorId` int(11),
    `id` int(11) NOT NULL,
    `ownerId` int(11) NOT NULL,
    `sourceSite` int(11) NOT NULL,
    `targetSites` varchar(1020) NOT NULL DEFAULT '',
    `status` enum('new','pending','modified','getting quote','needs approval','in preparation','in review','in progress','ready for review','complete','canceled','published','failed') DEFAULT 'pending',
    `requestedDueDate` datetime(0),
    `orderDueDate` datetime(0),
    `comments` text,
    `activityLog` longtext,
    `dateOrdered` datetime(0),
    `serviceOrderId` varchar(255) DEFAULT '',
    `entriesCount` int(11) NOT NULL,
    `wordCount` int(11) NOT NULL,
    `elementIds` varchar(8160) NOT NULL DEFAULT '',
    `tags` varchar(8160) NOT NULL DEFAULT '',
    `trackChanges` int(11) DEFAULT 0,
    `includeTmFiles` int(11) DEFAULT 0,
    `trackTargetChanges` int(11) DEFAULT 0,
    `asynchronousPublishing` int(11) DEFAULT 0,
    `requestQuote` int(11) DEFAULT 0,
    `dateCreated` datetime(0) NOT NULL,
    `dateUpdated` datetime(0) NOT NULL,
    `uid` char(36) NOT NULL DEFAULT '0',
    PRIMARY KEY(`id`)
) ENGINE = InnoDb DEFAULT CHARACTER SET = utf8mb4 DEFAULT COLLATE = utf8mb4_0900_ai_ci
shnsumit commented 1 year ago

@robmcfadden

We were not able to reproduce this issue at our end and even no body else reported this before too. Actually the varchar type max row size limit is 65535 and total limit (including all columns) what we have used for creating table is far less to this limit.

We have tried to reproduce the issue in given versions but it looks working fine. So there might be some special scenario in your case may be some environment specific etc.

Can you please share some details about the environment (server etc.)? Where you were getting this locally, dev. stage or prod etc? and have you tried the plugin on any other environment?

🔗 Reference

https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html

spib commented 1 year ago

Hi @shnsumit

We're seeing the same issue, but with a slightly different character set / collation (utf8mb4_unicode_ci). We are using ddev so if it's useful I could share the ddev config file we're using?

PHP version 7.4.33 MySQL 10.4.27-MariaDB-1:10.4.27+maria~ubu2004-log Craft Pro 3.7.44

We're also using InnoDB - not sure if that affects things also? https://mariadb.com/kb/en/troubleshooting-row-size-too-large-errors-with-innodb/

shnsumit commented 1 year ago

@spib We have tried to set up the project on ddev and we were able to install the plugin without any issues.

image

It would be nice if you can share your config file and we can check and try to debug with the same.

spib commented 1 year ago

OK, here's the ddev config file we're using - just tried it with a fresh Craft install, but still couldn't install the plugin config.yaml.txt

spib commented 12 months ago

Hi @shnsumit - just checking in to see if you had any luck reproducing the issue? We'd love to use this plugin for a project we are working on but right now this is a blocker for us

shnsumit commented 12 months ago

@spib We have tried debugging using the provided config file, but we were still not able to reproduce the issue. Is it possible to have a quick call to see the error at your end, that may help to quickly figure out and reproduce the issue.

MerrittBoydston commented 9 months ago

Hi @spib, have you had time to organize a call with @shnsumit to discuss this issue? If you need help setting up this quick meeting, please let me know.

Thank you

bhupeshappfoster commented 6 months ago

The issue has been fixed in this PR