• The theme includes templates for individual pages. Part done by me and part by some other webdeveloper who made the website. By a strange coincidence, two pages from the template do not want to work.

    I am unable to identify the problem.

    There is a code in the page that does not open:

    <?php
    /**
     * Template Name: User - Dashboard
     * Template Required: true
     * Template Url: dashboard
     */
    
    Cake::dispatch(array('Users', 'dashboard'), array(null));

    In the template files there is also a file inc/ and there is many application component files made by the previous programmer to suit the needs of the page. For example is inc / app / View / Users / dashboard.ctp

    I know that it’s hard to read coffee grounds without looking into the construction of the whole. But do I correctly deduce that I should look for some problem in the connection between those two files?

    I can’t find any helpful information about this Cake :: dispatch (array …

    Could someone throw a lifeline?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Cake has nothing to do with core WP. I assume it belongs to the CakePHP framework. Using a framework is fine, but its usage isn’t supported here. There are a bunch of documentation and support options at cakephp.org.

    Thread Starter coliberek1

    (@coliberek1)

    Hi, thank you very much for this TIP. I didn’t even think that it could be CakePHP. Totally forgot about that and of course have no idea at all about CakePHP….but it is a good beginning.

    It is so strange that all dashboard works good, but two pages doesn’t want to work.

    Sometimes error says that there is to many redirections. But there is nothing redirected in .htaccess

    As I am working on the subdomain, do you think that I should look for some link to the main domain in settings/database/ files of the theme ?

    Moderator bcworkz

    (@bcworkz)

    WP also can do redirects, e.g. wp_redirect(). If a page redirects to itself, naturally you’d get too many redirects. That’s obvious, but there can be intermediate redirects before the loop closes, so it’s not usually so obvious as calling oneself.

    If the site is responding only to a subdomain request, the WP and site address settings should reflect that subdomain. Sites that respond to different domain/subdomain requests will be redirected to what ever those settings dictate. This could result in an infinite redirect loop, but it would affect all requests, not only two pages.

    Other than those two settings, subdomains normally have little influence over PHP execution. It is possible for custom code to make use of subdomain values, but it’s not normally a factor.

    You need more specific guidance on where/what the errors are. Check the error log for clues, or define WP_DEBUG as true in wp-config.php. This will cause error messages to be visible on the page itself.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘problem with page template’ is closed to new replies.