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.

Need URGENT help with truncated text!

January 12, 2009 4:42am

Subscribe [2]
  • #1 / Jan 12, 2009 4:42am

    karentempler

    104 posts

    I’ve posted an uncommonly long entry tonight—our cover story, naturally—without knowing about the character limit in the text fields. Search has turned up several other threads on this same problem, but I need a more detailed explanation of how to make the fix from TEXT to MEDIUMTEXT.

    1) I need to know how to locate the field id for the custom field in question.

    2) I need to know precisely how to change the setting for that field. I don’t know a thing about PHP or MySQL, so I need clear instructions—go here, enter this ...

    And again, this is my LIVE cover story which is only displaying 2/3 of the text, so I need to get this fix in place ASAP.

    Thanks in advance for your help!

  • #2 / Jan 12, 2009 4:48am

    Ingmar

    29245 posts

    As an emergency fix, I’d recommend to make your story a two-parter, posting both parts at the same time, perhaps linking between them. That should take away some of the urgency of solving this problem for the time being.

    We can then take our time to fix this once and for all, but since it involves manipulating the database directly it shouldn’t be rushed (or undertaken without a recent and verified backup, for that matter).

  • #3 / Jan 12, 2009 4:59am

    Ingmar

    29245 posts

    OK, next step, locate the field. What custom field are we talking about? Go to Weblog Administration > Custom Weblog Fields >  Add/Edit Custom Fields. There’s a column “Field Label”, click the field you want, then take a look at the URL:

    http://example.com/system/index.php?S=0&C=admin&M=blog_admin&P=edit_field&field_id=2

    That’s the field_id we are looking for. In a default install, field_id 2 normally refers to the “body” field. Makes sense? Once we got that number we can then locate the field in the db and change its type.

  • #4 / Jan 12, 2009 11:59am

    karentempler

    104 posts

    YES! Thank you—so it’s field_id=17

  • #5 / Jan 12, 2009 12:52pm

    Pascal Kriete

    2589 posts

    Ok, before we do this, make a database backup.

    Then go into your sql manager (Admin ›  Utilities ›  SQL Manager ›  Database Query Form)

    And run the query:

    ALTER TABLE exp_weblog_data MODIFY field_id_17 MEDIUMTEXT;
  • #6 / Jan 12, 2009 1:19pm

    karentempler

    104 posts

    Hi, Pascal. So as soon as I learn how to backup the database I will run that query.

    It’s just paste that string into the query field and hit go, right?

  • #7 / Jan 12, 2009 1:55pm

    Greg Aker

    6022 posts

    karentempler:

    You got it.  Run that query after your backup and report back to us!

    -greg

  • #8 / Jan 12, 2009 2:36pm

    karentempler

    104 posts

    I ran the query. Got this:

    Query Result
    SQL Query
    ALTER TABLE exp_weblog_data MODIFY field_id_17 MEDIUMTEXT
    Total Affected Rows:  919

    And it had no effect—the post is still truncated, same as before. (I tried in two alternate browsers to be sure.)

  • #9 / Jan 12, 2009 2:38pm

    Greg Aker

    6022 posts

    have you tried editing the entry?  If it was truncated in the DB to begin with, it’s not going to appear after altering the table.

  • #10 / Jan 12, 2009 2:54pm

    karentempler

    104 posts

    Oh, I meant to ask you about that. (And hi, Greg, by the way. New faces since the last time I bothered you all.)

    It was all there when previewing the post, but you’re saying it wouldn’t all have been stored in the database, regardless?

  • #11 / Jan 12, 2009 3:13pm

    Lisa Wess

    20502 posts

    Correct, you ran into the limit of what that table could hold, and so it just didn’t store the rest.  Now that you’ve updated it, you should be able to add in the rest of your text. =)

  • #12 / Jan 12, 2009 3:14pm

    Ingmar

    29245 posts

    Yes, you need to re-edit that entry, paste in the full text and re-save. All you have done, so far, is enlarged the storage capacity, as it were.

  • #13 / Jan 12, 2009 3:34pm

    karentempler

    104 posts

    Fixed! Thank you all!

  • #14 / Jan 12, 2009 3:36pm

    Lisa Wess

    20502 posts

    Happy to hear it, Karen!

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

ExpressionEngine News!

#eecms, #events, #releases