Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21771

On PostgreSQL, a fatal error is raised if we use string attributes with 11 numbers

    XMLWordPrintable

Details

    Description

      Hi,
      In PostgreSQL, if i create an object that has a string attribute, and in that attribute we register a string with 11 numbers, we have a fatal error.

      To reproduce:

      • Create a class with a string attribute
      • Create an object of previous class, and in string attribute put the number 12345678901
      • Save for publishing

      When saving, we have the following error:

      Fatal error: A database transaction in eZ Publish failed.
      

      In debug, we have:

      Error: eZPostgreSQLDB 	Oct 17 2013 12:04:01
      
      Error: error executing query: INSERT INTO
                                 ezsearch_object_word_link
                                 ( word_id,
                                   contentobject_id,
                                   frequency,
                                   placement,
                                   next_word_id,
                                   prev_word_id,
                                   contentclass_id,
                                   contentclass_attribute_id,
                                   published,
                                   section_id,
                                   identifier,
                                   integer_value )
                                   VALUES  ( '994', '72', '0', '1', '0', '996', '16', '182', '1382004241', '1', 'string', '12345678901' ) : ERROR:  value "12345678901" is out of range for type integer
      LINE 15: ... '996', '16', '182', '1382004241', '1', 'string', '123456789...
                                                                    ^
      
      Error: eZDBInterface::commit TRANSID-ae0223081bf3ccf80eff38b822493e9f 	Oct 17 2013 12:04:01
      
      Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-ae0223081bf3ccf80eff38b822493e9f.
      

      Note1: This error do not happen if we use a string with 11 characters instead of only numbers
      Note2: This error do not happen if we use a smaller string with less numbers (until 10 numbers)
      Note3: This issue only happens on PostgreSQL. Do not happen on Mysql.

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulo.nunes-obsolete@ez.no Paulo Nunes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 30 minutes
                6h 30m