? Success

User tests: Successful: Unsuccessful:

avatar spignataro
spignataro
27 Jul 2014

How to reproduce the problem and/or test the patch::

Joomla attributes has a varchar 5120 set to it. If you create a custom field that stores to this table it won't save the full amount. Need to change from varchar to text.

Summary

Attribs doesn't support large amounts of data for #__content
Details
Joomla attributes has a varchar 5120 set to it. If you create a custom field that stores to this table it won't save the full amount. Need to change from varchar to text.
In install file change

attribs varchar(5120) NOT NULL,
to

attribs text NOT NULL,

avatar spignataro spignataro - open - 27 Jul 2014
avatar spignataro spignataro - change - 27 Jul 2014
Title
Fix attribs from being truncated when many are stored
[#33761] Fix attribs from being truncated when many are stored
avatar brianteeman
brianteeman - comment - 27 Jul 2014

Steven you will also need to fix the other supported databases AND to alter the update sql scripts otherwise this wouldnt work on existing sites

avatar spignataro spignataro - change - 27 Jul 2014
Title
Fix attribs from being truncated when many are stored
[#33761] Fix attribs from being truncated when many are stored
Labels Added: ? ?
avatar spignataro
spignataro - comment - 27 Jul 2014

Brian

I added postrgresql - I don't have access to azuresql - so you will need to have someone check that - but it looks like it should be fine.

avatar brianteeman brianteeman - change - 21 Aug 2014
The description was changed
Status New Pending
avatar nicksavov nicksavov - change - 21 Aug 2014
Labels Removed: ?
avatar brianteeman brianteeman - change - 17 Oct 2014
The description was changed
avatar brianteeman brianteeman - change - 17 Oct 2014
Category MS SQL Postgresql SQL
avatar waader
waader - comment - 13 Mar 2015

mssql would look like this:

[attribs] nvarchar NOT NULL,

Additionally update sql-files are needed for all three databases in administrator/components/com_admin/sql/updates/

mysql:
ALTER TABLE #__content CHANGE attribs attribs TEXT NOT NULL;

postgresql:
ALTER TABLE "#__content" ALTER COLUMN "attribs" TYPE text;

mssql:
ALTER TABLE [#__content] ALTER COLUMN [attribs] nvarchar NOT NULL;

avatar spignataro
spignataro - comment - 20 Jul 2015

Can this be merged in? it has been some time. Both mysql and postgresql are part of this PR. I can't test MS SQL.

This is getting annoying not having this in and I have to continue modifying the database structure.

I will create a new PR for the updates (only for mysql and postgresql - again I can't test mssql)

avatar spignataro
spignataro - comment - 20 Jul 2015

After looking at the update sql scripts - what is the best format/naming scheme to perform the update?

avatar mbabker
mbabker - comment - 20 Jul 2015

Whatever the next version is planned to be plus the date you've made the change. So for now you can go with 3.4.4-2015-07-20.sql.

As far as the Microsoft drivers go, it doesn't look like they need a change. Using https://www.mssqltips.com/sqlservertutorial/2203/mysql-to-sql-server-data-type-comparisons/ as a source, it seems several of the MySQL field types (including varchar and text) map to SQL Server's nvarchar field and we're already using nvarchar(max) for the field definition.

avatar roland-d
roland-d - comment - 3 Nov 2015

@spignataro This can't be merged because it is incomplete nor does it have any tests.

avatar roland-d roland-d - change - 8 Nov 2015
Status Pending Information Required
avatar brianteeman
brianteeman - comment - 19 Dec 2015

@spignataro Thank you for your contribution.

The last comment here was on 4 November. Can you please follow-up on this issue? If not this will be closed within 4 weeks

Thanks for understanding!


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

avatar spignataro
spignataro - comment - 20 Dec 2015

Brian - I do not know how to make any tests for this as well as I have no way of testing the other databases other than the ones I have access to. What needs to be done to get this merged? I have to hack all the time to get this to work properly.

avatar brianteeman brianteeman - change - 7 May 2016
Status Information Required Needs Review
avatar wilsonge
wilsonge - comment - 7 May 2016

I'm going to close this issue for a few reasons:
1) It was a deliberate decision to use text rather than varchar (53e91f4)
2) I don't want to encourage people to use the attribs to store custom stuff. You can create custom database tables to do this. There's no reason to hack into com_content's attribs column.


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

avatar wilsonge wilsonge - change - 7 May 2016
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2016-05-07 09:56:33
Closed_By wilsonge
avatar wilsonge wilsonge - close - 7 May 2016

Add a Comment

Login with GitHub to post a comment