The getter/setter methods generated for normal (not long) text fields uses the getText() and setText() methods. But I believe what is needed there is the normal get() and set(), since EntityDrupalWrapper expects a string for the value of these. I'm attaching a patch that seems to fix it for me (though I may be missing some steps.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

brockfanning’s picture

Status: Active » Needs review
FileSize
1.08 KB
zengenuity’s picture

I need to run some tests, but I know that normal text fields can support formatted text. There's some code inside setText() that is supposed to work that out from the field config, and then decide if it's plain text only or not. Perhaps that code doesn't work correctly. Do the exceptions go away if you switch that field into formatted mode under the field config?

brockfanning’s picture

Aha, yes, if I change the field configuration from "Plain text" to "Filtered text" then the exception go away.

zengenuity’s picture

Okay, I had left a test field name in the setText() function instead of checking the actual field name being called. Please test it with this patch and using the Plain Text option on the field like you had initially.

brockfanning’s picture

Just tested this, that fixed the issue for me, thanks!

  • zengenuity committed 3903789 on 7.x-1.x
    Issue #2468965 by brockfanning, zengenuity: Exceptions when getting/...
zengenuity’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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