String data, right truncated: 1406 Data too long for column 'args' at row 1: INSERT INTO "draggableviews_structure"

Created on 3 April 2023, over 1 year ago
Updated 14 December 2023, about 1 year ago

Problem/Motivation

The varchar length of 255 for the 'args' array is insufficient when dealing with lengthy arguments in a views query. Some queries can create long arguments (e.g. list of taxonomy term IDs) and as such, a warning message is shown when trying to save the row order.

There was an error while saving the data. Please, try again.

After that, the draggableviews order is unable to save.

Steps to reproduce

  • Install draggableviews
  • Create a view table with rows
  • Filter the rows with an exposed or contextual filter with a long argument list
  • Try to reorder the rows with drag handles
  • Save order

Proposed resolution

Increase length of varchar for the 'args' array to a higher value than 255.

πŸ“Œ Task
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada chrisck BC, Canada

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @chrisck
  • @chrisck opened merge request.
  • First commit to issue fork.
  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine podarok Ukraine

    tnx

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States asherry

    I ran into some issues with the update, which turned out to be particular to our site and not an actual module bug. While I was debugging, though, I re-installed the module and realized that the actual install schema isn't updated.

    If anybody installs this module for the first time, they won't actually get the varchar(1024).

    Sorry if this is fixed elsewhere, just thought I'd make a patch in case it isn't.

  • πŸ‡¨πŸ‡¦Canada chrisck BC, Canada

    @asherry Thanks for spotting this. Sorry I missed this in the original MR. As this issue is closed (fixed) I created a new follow up issue with a new MR and tagged you there.

  • πŸ‡ͺπŸ‡ΈSpain pnavarrr

    Using Drupal 10.1.5 and module version 2.1.3. The patch it's working for me.

Production build 0.71.5 2024