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 6043379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:53:39+00:00 2026-05-23T06:53:39+00:00

I have the following controller, and I get the error Notice (8): Undefined property:

  • 0

I have the following controller, and I get the error

Notice (8): Undefined property: View::$Paginator [CORE/plugins/forum/views/galleries/index.ctp, line 5]

Controller:

<?php
class GalleriesController extends AppController {

    var $name = 'Galleries';

    function index() {
        $this->Gallery->recursive = 0;
        $this->set('galleries', $this->paginate());
    }
}
?>

View:

<div class="galleries index">
    <h2><?php __('Galleries');?></h2>
    <table cellpadding="0" cellspacing="0">
    <tr>
            <th><?php echo $this->Paginator->sort('id');?></th>
            <th><?php echo $this->Paginator->sort('name');?></th>
            <th class="actions"><?php __('Actions');?></th>
    </tr>
    <?php
    $i = 0;
    foreach ($galleries as $gallery):
        $class = null;
        if ($i++ % 2 == 0) {
            $class = ' class="altrow"';
        }
    ?>
    <tr<?php echo $class;?>>
        <td><?php echo $gallery['Gallery']['id']; ?>&nbsp;</td>
        <td><?php echo $gallery['Gallery']['name']; ?>&nbsp;</td>
        <td class="actions">
            <?php echo $this->Html->link(__('View', true), array('action' => 'view', $gallery['Gallery']['id'])); ?>
            <?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $gallery['Gallery']['id'])); ?>
            <?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $gallery['Gallery']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $gallery['Gallery']['id'])); ?>
        </td>
    </tr>
<?php endforeach; ?>
    </table>
    <p>
    <?php
    echo $this->Paginator->counter(array(
    'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
    ));
    ?>  </p>

    <div class="paging">
        <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
     |  <?php echo $this->Paginator->numbers();?>
 |
        <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
    </div>
</div>
<div class="actions">
    <h3><?php __('Actions'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('New Gallery', true), array('action' => 'add')); ?></li>
        <li><?php echo $this->Html->link(__('List Images', true), array('controller' => 'images', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Image', true), array('controller' => 'images', 'action' => 'add')); ?> </li>
    </ul>
</div>
  • 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-23T06:53:40+00:00Added an answer on May 23, 2026 at 6:53 am

    It looks like the PaginatorHelper isn’t loaded. Usually, when you call $this->paginate(), CakePHP automatically loads the helper. You could explicitly load it by adding var $helpers = array('Paginator'); directly below the var $name = 'Galleries'; but something else is wrong.

    The paginate method in the Controller class only returns once before getting to the bottom of the file where it add the PaginatorHelper and it’s if can’t find the model. It should trigger an error that reads “Controller::paginate() – can’t find model Gallery in controller GalleriesController”. You may have error suppressed which could explain why you’re not seeing the problem.

    Try adding ini_set('display_errors', true);, display_errors(E_ALL);, and Configure::write('debug', 2); in the action, before any of the calls to enable errors.

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

Sidebar

Related Questions

I get the following errors when viewing my Admin Index Notice (8): Undefined property:
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I have the following form in my /app/views/password_resets/new.html.erb view <% form_tag password_resets_path do %>
I have the following controller @Controller @RequestMapping(/project/view.html) public class ProjectViewController { private static final
If i have the following strongly-typed view: <%@ Page Title= Language=C# MasterPageFile=~/Views/Shared/Site.Master Inherits=System.Web.Mvc.ViewPage<XXX.DomainModel.Core.Locations.Location> %>
I have the following controller action and test. I'm new to testing with Shoulda
I have the following controller: public ActionResult Search(string Name, int? Friend, int? Page) It
I have the following route: {language}/{controller}.mvc/{action}/{id} Once a user has choosen the language it
I have the following Model and Controller files, and when i visit this url,
I have the following code in my controller: public ActionResult Details(int id) { var

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.