Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6849501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:59:55+00:00 2026-05-27T00:59:55+00:00

I created an app with the cake bake command, and one table used text

  • 0

I created an app with the cake bake command, and one table used text as a field type.

All worked out well, a textarea was generated for that field and it works as expected.
I saved a few entries, viewed them edited a few.

I realised that one entry did not populate the textarea when using edit. It displays correctly in the view, but when editing the data is not in the textarea and saving that causes all the information to go missing.

And this happened with from a normal baked table.

here is the value I used it the textarea:

Morning Christopher,

Please can you send me the password for our email accounts at Citano as we need it to reset my directors email account for his blackberry.

· Your urgent response is required in this matter.

Jaques Kruger
Citano Distributors.

Yes there is a strange character in there, I think a bullet point from word.

Is this a framework bug, that was fixed later?
I tested on 1.3.10 and 1.3.8 .

Any help would be appreciated.

Edit:

Here is the standard baked view "edit.ctp":

<div class="tickets form">
<?php echo $this->Form->create('Ticket', array('type'=>'file'));?>
    <fieldset>
        <legend><?php __('Edit Ticket'); ?></legend>
    <?php 
        echo $this->Form->input('Ticket.id');
        echo $this->Form->input('Ticket.name', array('label' => 'Ticket name'));
        echo $this->Form->input('Ticket.details'); # Problem textarea not populating
        echo $this->Form->input('Ticket.user_id', array('label' => 'Assigned to'));
        echo $this->Form->input('Ticket.queue_id');
        echo $this->Form->input('Ticket.client_id', array('options' => $clients,'default' => $defaultClient,'empty' => 'None'));
        echo $this->Form->input('Ticket.status', array('options' => $ticketStatus));
        echo $this->Form->input('Ticket.accepted', array('type' => 'checkbox'));
        echo $this->Form->input('Ticket.linkedticketid', array('options' => $linkTickets,'empty' => 'None','style' => 'width:100%;','label' => 'Linked ticket'));
        echo $this->Form->input('Ticket.due_date');
        echo $this->Form->file('attachment');
        echo $this->Form->input('email', array('label' => 'Additional email to mailing list'));
    ?>
    </fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<div class="actions">
    <h3><?php __('Actions'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('View Ticket', true), array('action' => 'view', $this->Form->value('Ticket.id'))); ?> </li>
        <li><?php echo $this->Html->link(__('List Ticket', true), array('action' => 'index')); ?> </li>
    </ul>
</div>

And here is the controller:

function edit($id = null) {
    if (!$id && empty($this->data)) {
        $this->Session->setFlash(__('Invalid ticket', true));
        $this->redirect(array('action' => 'index'));
    }
    if (!empty($this->data)) {
        if ($this->Ticket->save($this->data)) {
            $this->Session->setFlash(__('The Ticket has been saved', true));
            $this->redirect(array('action' => 'index'));
        } else {
            $this->Session->setFlash(__('The Ticket could not be saved. Please, try again.', true));
        }
    }
    if (empty($this->data)) {
        $this->data = $this->Ticket->read(null, $id);
    }
}

As I said before, the data has already been added, and there is nothing wrong with the data, but when editing the textarea does not always populate with existing data, while the rest of the fields always populates with existing data.

Debug Data in edit.ctp

Array
(
    [Ticket] => Array
        (
            [id] => 281
            [linkedticketid] => 
            [user_id] => 1
            [queue_id] => 4
            [name] => password
            [details] => Morning Christopher,

Please can you send me the password for our email accounts at Citano as we need it to reset my directors email account for his blackberry.

�        Your urgent response is required in this matter.

Jaques Kruger
Citano Distributors.

            [status] => 0
            [accepted] => 0
            [due_date] => 2011-11-12
            [mailedtech] => 1
            [uuid] => 34b12707-0b87-11e1-97b4-001e90d15e95
            [created] => 
            [modified] => 2011-11-10 12:48:51
        )

    [User] => Array
        (
            [id] => 1
            [group_id] => 1
            [name] => Christopher
            [username] => Nightwolf
            [password] => 8be1083780671a3b3541ff82r161d3d55a4e5d79
            [email] => Christopher@example.com
            [created] => 2011-09-05 13:30:56
            [modified] => 2011-09-05 13:31:34
        )

    [Queue] => Array
        (
            [id] => 4
            [name] => Christopher
            [rank] => 20
            [created] => 2011-09-05 13:58:40
            [modified] => 2011-09-05 13:58:40
        )

    [Task] => Array
        (
        )

    [Ticketforclient] => Array
        (
            [0] => Array
                (
                    [id] => 95
                    [ticket_id] => 281
                    [client_id] => 
                    [created] => 2011-11-10 12:34:45
                    [modified] => 2011-11-10 12:48:51
                )

        )

    [Ticketnote] => Array
        (
        )

    [Ticketsinqueue] => Array
        (
            [0] => Array
                (
                    [id] => 67
                    [ticket_id] => 281
                    [queue_id] => 4
                    [created] => 
                    [modified] => 2011-11-10 12:48:50
                )

        )

    [Activitylog] => Array
        (
        )

    [Billinginfo] => Array
        (
        )

    [Attachment] => Array
        (
        )

    [Ticketmailinglist] => Array
        (
            [0] => Array
                (
                    [id] => 11
                    [ticket_id] => 281
                    [emailaddress] => christopher@example.com
                    [originalsender] => 0
                )

        )

)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:59:56+00:00Added an answer on May 27, 2026 at 12:59 am

    Make sure ~/app/config/core.php use this:

    Configure::write('App.encoding', 'UTF-8');  
    

    Layout section

    <?php echo $html->charset(); ?>  
    

    Database Config

    class DATABASE_CONFIG {
        public $default = array(
            ...
            'encoding' => 'utf8'
        );
    }
    

    And Read This

    http://book.cakephp.org/view/1616/x1-3-improvements

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Profile model/controller in my cake app as well as an index.ctp
I tried bake with Cakephp 2.0.4 stable with 'cake bake' command But it's giving
I created a few files in app/Lib folder and would like to access one
I created an App.config file in my WPF application: <?xml version="1.0" encoding="utf-8" ?> <configuration>
I've created an app that interacts with a SOAP service using java WS. I
I've created an app with a small window (the size of a combo box).
I have successfully created an app that reads from a bundled .plist file and
I have created an App Widget for Android 1.5. It uses a TextView to
I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process
I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.