Question

I want to display 3 simple selectboxes for "year","month","day" in cakePHP 1.3.

<?php echo $form->input(
        'trial_start',
        array(
            'div'=>null,
            'dateFormat' =>'YMD',
            'minYear' =>date('Y'),
            'maxYear' => date('Y')+5,
            'monthNames' => false,
            'empty'=>true,
            'label'=>false          ));  ?>
    ~
    <?php echo $form->input(
        'trial_end',
        array(
            'div'=>null,
            'dateFormat' =>'YMD',
            'minYear' =>date('Y'),
            'maxYear' => date('Y')+5,
            'monthNames' => false,
            'empty'=>true,
            'label'=>false          ));  ?>

In local environment, boxes are perfectly displayed but in my production server (same PHP and cakePHP version), the "trial_start" is not generated (see below images)

In my local server:

enter image description here

In my production server:

enter image description here

The 2 projects contain the same files and access to the same DB.

I would really appreciate any help . Thank you

Était-ce utile?

La solution

As commented it seems to be cache issue. If you have made recently any changes to your db just try clearing your cache from folder /app/tmp/.

Another trick to clear cache is,

  • First change the debug level to 3 in your core.php file.
  • Reload your application in browser.
  • Change the debug level back to 0.

Remember: Any time you add a new model or adjust your associations or make changes in structure of your database table, be sure to delete the cache folder from the /app/tmp/ folder.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top