Bug report #21019

Attribute table will not allow letter 'N' to be entered

Added by Keelan Fadden-Hopper over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:High
Assignee:Jürgen Fischer
Category:Attribute table
Affected QGIS version:3.4.4 Regression?:Yes
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28838

Description

Entering the letter N as the value in the attribute table for a layer does not work. QGIS will not allow the layer to be saved. All other letters and strings work.

I've tested this both on a temporary scratch layer and a couple of PostGIS databases with the same results.

ss_qgis_bug.PNG (20.5 KB) Keelan Fadden-Hopper, 2019-01-17 11:10 AM

StringLikeNullValue-3-4-3-Win10.png - screencast (1.88 MB) Gabriel De Luca, 2019-01-19 12:14 AM

Associated revisions

Revision 99904f1f
Added by Jürgen Fischer over 5 years ago

field validator: only check for null representation if the string value exceeds the field length (fixes #21019)

Revision 1b6329c3
Added by Jürgen Fischer over 5 years ago

field validator: only check for null representation if the string value exceeds the field length (fixes #21019)

(cherry picked from commit 99904f1f5e7b86a92f3ff50132fd89750fe858e7)

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

Just tried on 3.4.3 on Windows 10 and cannot confirm.

#2 Updated by Keelan Fadden-Hopper over 5 years ago

Giovanni Manghi wrote:

Just tried on 3.4.3 on Windows 10 and cannot confirm.

I can give it a go installing 3.4 on Windows 10 and see what happens but maybe it’s just a 3.2 issue

#3 Updated by Keelan Fadden-Hopper over 5 years ago

Keelan Fadden-Hopper wrote:

Giovanni Manghi wrote:

Just tried on 3.4.3 on Windows 10 and cannot confirm.

I can give it a go installing 3.4 on Windows 10 and see what happens but maybe it’s just a 3.2 issue

I have tried with a fresh install of 3.4.3 from the QGIS website and I'm still getting the same error. It's a really strange error but I'm not sure why it wasn't replicable.

#4 Updated by Gabriel De Luca over 5 years ago

Same behavoir here.

The string defined in Settings > Options > Data Sources > Representation of NULL values, or strings "LIKE" that ('N', 'NU', 'NUL', 'NULL', by default), can't be entered by keyboard in string type fields, editing the attribute table.

That values (except the 'NULL' string) can be entered in the add-feature form, or from the field calculator.

#5 Updated by Giovanni Manghi over 5 years ago

Gabriel De Luca wrote:

Same behavoir here.

The string defined in Settings > Options > Data Sources > Representation of NULL values, or strings "LIKE" that ('N', 'NU', 'NUL', 'NULL', by default), can't be entered by keyboard in string type fields, editing the attribute table.

That values (except the 'NULL' string) can be entered in the add-feature form, or from the field calculator.

I can't confirm or I'm not understanding how to replicate, for the sake of clarity please add step by step instructions. Thanks.

#6 Updated by Keelan Fadden-Hopper over 5 years ago

Giovanni Manghi wrote:

Gabriel De Luca wrote:

Same behavoir here.

The string defined in Settings > Options > Data Sources > Representation of NULL values, or strings "LIKE" that ('N', 'NU', 'NUL', 'NULL', by default), can't be entered by keyboard in string type fields, editing the attribute table.

  1. > >

That values (except the 'NULL' string) can be entered in the add-feature form, or from the field calculator.

I can't confirm or I'm not understanding how to replicate, for the sake of clarity please add step by step instructions. Thanks.

Step by step instructions:

  1. Open QGIS and start new project
  2. Layer > Create Layer > New Shapefile Layer
  3. Set file name and location
  4. Set new field name with type Text data
  5. Add to Fields List
  6. OK
  7. Right click layer in Layers pane > Toggle Editing
  8. Edit > Add Point Feature
  9. Drop somewhere on map
  10. OK
  11. Right click layer in Layers pane > Open Attribute Table
  12. Click on cell (1, asd)
  13. Type N
  14. Press enter or click outside cell. Note that the value will not save in the cell. Observe the behaviour with any other letter.

Hope that helps...

#7 Updated by Gabriel De Luca over 5 years ago

Screencast attached.

#8 Updated by Jérôme Guélat over 5 years ago

I can confirm this issue using QGIS 3.4.4 with a GeoPackage on Windows 7. It's also a regression (not happening with QGIS 2.18).

#9 Updated by Giovanni Manghi over 5 years ago

  • Affected QGIS version changed from 3.2.2 to 3.4.4
  • Status changed from Feedback to Open
  • Priority changed from Normal to High
  • Regression? changed from No to Yes

I'm seeing that now.

#10 Updated by Jürgen Fischer over 5 years ago

  • Assignee set to Jürgen Fischer

#11 Updated by Jürgen Fischer over 5 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF