?
avatar calligraphic
calligraphic
3 Aug 2018

Steps to reproduce the issue

Create a JSON string for the "special" key of the #__content_types table's table field that uses longer names for the dbtable or key than the JSON used in default installation, or includes configuration options.

Expected result

That the database update won't error

Actual result

Database errors, as the field is defined as VARCHAR(255) on MySQL

System information (as much as possible)

MySQL database, Joomla! 3.8.10

Additional comments

The largest current entry for the table field is for Newsfeeds (type_alias com_newsfeeds.newsfeed), at 227 characters. The field is created as VARCHAR(255). I am using a prefixed surrogate key (so longer than just id) and my component table is namespaced (e.g. #__vendor_tablename), and together they exceed the 255 character limit.

Also, I notice that there are "config":"array()" keys in the JSON. One configuration option in com_contenthistory is ignore_request, set to a default of true. Any configuration options used would likely push the string length over the 255 character limit.

I'd submit a PR, but don't have a good feel for what the field size should be.

avatar calligraphic calligraphic - open - 3 Aug 2018
avatar joomla-cms-bot joomla-cms-bot - change - 3 Aug 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Aug 2018
avatar calligraphic calligraphic - change - 3 Aug 2018
The description was changed
avatar calligraphic calligraphic - edited - 3 Aug 2018
avatar calligraphic calligraphic - change - 3 Aug 2018
The description was changed
avatar calligraphic calligraphic - edited - 3 Aug 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Aug 2018
Category Feature Request SQL
avatar calligraphic calligraphic - change - 5 Aug 2018
The description was changed
avatar calligraphic calligraphic - edited - 5 Aug 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Aug 2018
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 12 Aug 2018

can a more experienced User comment this Issue as its open since more than a Week having Status "New"?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21395.

avatar alikon
alikon - comment - 12 Aug 2018

can be doubled declaring as VARCHAR(512)

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 12 Aug 2018

@calligraphic any Comment on Comment by @alikon?

avatar brianteeman brianteeman - change - 20 Aug 2018
Title
#__content_types 'table' field too narrrow
#__content_types 'table' field too narrow
avatar brianteeman brianteeman - edited - 20 Aug 2018
avatar calligraphic
calligraphic - comment - 21 Aug 2018

Hi @franz-wohlkoenig franz, sorry to lose track of this issue. I've been working around the issue with this DDL statement in my install SQL:

ALTER TABLE `#__content_types` MODIFY `table` VARCHAR(2048);

I think a wider column than what @alikon suggested might be a good idea. It's not an indexed field so there's no performance impact.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Aug 2018

thanks for Comment @calligraphic. Is this Discussion #19618 similar to your Issue?

avatar brianteeman
brianteeman - comment - 21 Aug 2018

@franz-wohlkoenig no thats very different and this one is a legitimate reason for slightly increasing the size

avatar joomla-cms-bot joomla-cms-bot - change - 21 Aug 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 21 Aug 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Aug 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-08-21 13:14:32
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 21 Aug 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Aug 2018

closed as having Pull Request #21796

avatar calligraphic
calligraphic - comment - 21 Aug 2018

@franz-wohlkoenig Thank you. My first Joomla! PR :)

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Aug 2018

@calligraphic congratulations to your first PR :-)

Add a Comment

Login with GitHub to post a comment