Closed (won't fix)
Project:
SimpleAds
Version:
7.x-1.8
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2012 at 20:04 UTC
Updated:
9 Jun 2023 at 16:58 UTC
Jump to comment: Most recent
The "Text Ad" (field_ad_text) field is defined with the Field Type "Text"; it should be "Long text".
Attempting to change the widget properly allows only the "Text field" widget type to be selected, where if the field were defined correctly it would allow widgets that work with Long text fields to be selected.
Comments
Comment #1
jbulcher commentedAdditionally, the text ad field only supports 255 characters. When designing html text ads with inline css, this can be a showstopper.
Comment #2
jbulcher commentedThe following script is a quick hack to make the ad_text field work as intended. Hopefully we'll see a fix for this bug.
Comment #3
SimonD commentedThis is causing a problem on one of my sites. An advertiser is asking for specific styling for an advert which I want to style inline but the character limit prevents me from achieving what they want.
Also it is very limiting not being able to use widgets.
Hope this bug gets fixed soon.
Comment #4
jbulcher commentedSimon,
Did you try running the script I wrote to fix the field? Let me know if it works for you. I've tied my script into a dev module's install file, and so far it seems to work just fine.
It would be nice to see the field fixed in the module, though.
Comment #5
fpap commentedWhere do I should paste this code? Into an existing file? Should I create a new file?
Thanks in advance!
Comment #6
Anonymous (not verified) commentedWhere do we put this code, the 255 limit is really hard to use HTML in.
Comment #7
felixodie commentedAre there any updates on this? I simply can not use google adsense with this module because of the 255 character limit. :(
Comment #8
jbulcher commentedI ran the code through drush as a one-time update. Depending on your setup, there may be other ways to do it.
Comment #9
liquidcms commentedthe correct solution here is not a script to fix the db but a patch to create an _update function in the .install file to fix this.
Comment #10
Anonymous (not verified) commentedSo, would it be possible, to construct that for me. I have yet to create a module to have that ... Do I just take that script in #2 and put it into a function?
Comment #11
emptyvoid commentedI consider this a major issue for the text ad type otherwise it is totally useless.
Comment #12
Anonymous (not verified) commentedUp added this to _7006 update in the simpleads.update.inc file.
I can see in the DB that the fields are now long text fields, but Drupal is still reporting that there is a text character limit of 255.
I had a look in the field_config table and field_text_ad is set to type:text and module: text
I changed that to type:text_long, and then manual cleared flushed caches.
Still nothing. What am I missing? I tried to run the field_cache_clear(); again, but it didn't seem like that helped.
Here is what I added to the update file
Comment #13
Andre-Bthis seems to be fixed in 7.x-1.x-dev, at least for a fresh installation.
Comment #14
minnur commented