Skip to content

Incorrect integer value error when importing empty value for integer columns #39

Open

Description

@hissy
Handling "PortlandLabs\Concrete5\MigrationTool\Publisher\Command\PublishPageContentCommand" failed: An exception occurred while executing 'INSERT INTO btImageSliderEntries (bID, id, cID, fID, linkURL, internalLinkCID, title, description, sortOrder) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [187, "4262", "0", "", "", "0", "\u30bf\u30a4\u30c8\u30eb\u3068", "
\u672c\u6587\u306e\u307f<\/p>\n", "0"]: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'fID' at row 1

You can reproduce this issue by adding an image slider block with entries with no images selected.

Activity

  1. hissy commented on Mar 30, 2024

    @hissy
    ContributorAuthor

    I gave up trying to fix this issue on Version 9 because I couldn't decide how to fix it.

    This issue is quite similar to concretecms/addon_migration_tool#104 and can be reproduced using the same XML file, but the same change for StandardPublisher doesn't solve this issue on Concrete version 9.

    I think the best way is to check the column definition before saving data to the database in the \Concrete\Core\Legacy\BlockRecord class. However, the class is already deprecated, so we may have to create a new modern BlockRecord class to handle additional tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions