ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

ExpressionEngine not storing numbers in custom fields properly.

February 13, 2011 5:58pm

Subscribe [7]
  • #1 / Feb 13, 2011 5:58pm

    Ben Lilley

    214 posts

    Hi,

    I’ve run into an issue with a site we’ve just finished development on. It’s a site which lists boats which are for sale, and as such some of these boats are in the multi-million dollar range. I’m getting the client to enter these prices into the site without any symbols, so $13,500,000 is entered into the backend as 13500000. This is so that it works as expected when the user is searching/sorting by price.

    When I select Number as the type of content on a text field EE then changes how the number is stored and is shown like this: 1.35e+07 - which isn’t very helpful for the client or when searching the site.

    Now if I change the type of content to Integer or Any the number is shown correctly in the back-end and front-end however it is no longer ordered correctly in the search results with prices appearing in no particular order ($100,000 is shown before $1,000,000) when sorting by highest price.

    So in summary, I need to store my prices as a ‘Number’ content type to get search results to display correctly when searching/sorting by price, but EE is taking any number over a million dollars and changing it to store it using math which is way over a clients head (and mine). Please help as this project cannot go live until we have a resolution.

    Thanks


    EDIT: 2.1.3 / 20101220 / MySQL: 5.0.51a / PHP: 5.2.6-1

  • #2 / Feb 14, 2011 4:39am

    John Henry Donovan

    12339 posts

    Ben,

    while it is the correct syntax I believe to be stored in the database it should not be showing like that in the custom field.

    I created a bug report on your behalf here

  • #3 / Feb 14, 2011 5:29am

    Ben Lilley

    214 posts

    Thanks for that. I’ll try search results again tomorrow while using the Number field as after further tests this afternoon I’m not convinced it’s ordering them correctly.

  • #4 / Feb 14, 2011 9:55am

    Sue Crocker

    26054 posts

    Hi, Ben. If the value is being saved as 1.35e+07, that would make sense why it isn’t ordering properly. It’s a side effect of the bug. Make sense?

  • #5 / Feb 14, 2011 2:17pm

    Ben Lilley

    214 posts

    Thanks Sue. If that’s the case I’m not sure this bug is “trivial” as it will delay the launch of my client project…

  • #6 / Feb 14, 2011 4:28pm

    Ingmar

    29245 posts

    I don’t see why Integer shouldn’t work? It’s not as though you’d need the floating point precision of “Number”. That said, thanks for the bug report, it’s being looked into.

  • #7 / Feb 14, 2011 4:35pm

    Ben Lilley

    214 posts

    Because Integer doesn’t order correctly in the search results for some reason. As soon as I set the field type as integer I get random ordering when sorting by price. For example if I sort by highest price it’s not unusual to see $130,000 put as a higher price than $1,000,000.

  • #8 / Feb 15, 2011 9:02am

    Sue Crocker

    26054 posts

    Would a text field type work temporarily? You’d need to use some sort of find and replace plugin to fix the issues with sorting..

    Like store:

    $0130,000
    $1,000,000

    and have the find and replace replace $0 with $?

  • #9 / Feb 15, 2011 3:44pm

    R.BIRD

    41 posts

    Perhaps this is also related to the same issue, fyi:

    For example: I have entered “2009.022” in a Number field, but the result is being shown as “2009.02” (dropped the third decimal) on the publish form and displayed on output as “2004.028961278685393”

  • #10 / Feb 15, 2011 4:08pm

    Ben Lilley

    214 posts

    Thanks Sue, but that’s not really fair on the client to go add multiple 0’s before all their prices (some boats go up to $100,000,000) they have entered in 100’s of boats.

    Guess I’m just going to have to cross my fingers and hope for a timely fix.

  • #11 / Feb 16, 2011 12:28am

    John Henry Donovan

    12339 posts

    Ben,

    I went ahead and upgraded the report status a bit for you. Keep an eye on the bug report and the devs will review when they get a chance

  • #12 / Mar 22, 2011 11:02pm

    Ben Lilley

    214 posts

    Just following this up because I haven’t seen an update on this issue: https://support.ellislab.com/bugs/detail/15256/

    Just so we’re on the same page, these bugs mean my client site is still not live well over a month later because this isn’t fixed and no hot fix provided. The client cannot edit any boats with a price over a million dollars because as soon as they hit save they get an error saying only numbers allowed in the field and ordering by price for users doesn’t work correctly.

    To me this is just not good enough.

    I know you guys have a small team and a lot of work to do but this sort of stuff (ie https://support.ellislab.com/bugs/detail/14821/) just isn’t fair. For bugs that directly impact our clients ability to use their site we need fixes fast.

    We (and our clients) put our trust in EE. Right now you’re making us look like fools by having to apologise to clients for our chosen platform’s ongoing issues. For a company that last year promised better communication and a smoother development process I’m really not feeling the changes at this end.

  • #13 / Mar 23, 2011 12:13am

    Lisa Wess

    20502 posts

    Good evening, Ben,

    I am sorry that your bug hasn’t yet been looked at.  We are hoping to take care of the critical bugs quickly.  I will talk to the dev team and see if we can get your site at moved toward a resolution, though that may come in the form of a temporary modification or patch.

    I apologize for the delay in getting this fixed and how badly it has impacted your clients site.  Thank you for the feedback, and if you do have more feedback you’d like to share privately, you are always welcome to email me via .(JavaScript must be enabled to view this email address).

    -Lisa

  • #14 / Mar 23, 2011 12:38am

    Ben Lilley

    214 posts

    Good evening, Ben,

    I am sorry that your bug hasn’t yet been looked at.  We are hoping to take care of the critical bugs quickly.  I will talk to the dev team and see if we can get your site at moved toward a resolution, though that may come in the form of a temporary modification or patch.

    I apologize for the delay in getting this fixed and how badly it has impacted your clients site.  Thank you for the feedback, and if you do have more feedback you’d like to share privately, you are always welcome to email me via .(JavaScript must be enabled to view this email address).

    Thanks Lisa, this isn’t about my bug per se (though I would appreciate a patch), it’s more of a general frustration about how bugs which are impacting all our clients are getting handled. Again, I know you guys are really busy as probably don’t have a big enough team, but right now bug fixes aren’t coming fast enough. Over three months and counting to get critical fixes is not acceptable.

    Thanks for listening though, and I might shoot you an email in the next couple of days when I’m not so worked up 😊

  • #15 / Mar 23, 2011 12:44am

    Lisa Wess

    20502 posts

    Ben,

    You are right, and we’ll review the handling of bugs, especially criticals (and majors).

    But your bug report was a minor bug - likely accurate for the large majority of sites; but in your case, you couldn’t launch because of this.  For your site, this is a critical bug.  We’re here to help our you and our community be successful - and in this case, we failed you.

    I do apologize for that, and will try to get that rectified if at all possible, without having to wait for a release.

    Thank you again, Ben.  I’ll watch out for that potential email.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases