Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Web template editor, error

Discussion in 'User Experience' started by Petar, Jan 15, 2018.

  1. Petar

    Petar Member

    Joined:
    Apr 5, 2017
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Serbia
    cPanel Access Level:
    Root Administrator
    When I open Web template Editor I can see page for all template, but if I click on preview of any page I got blank preview form with error:

    Template file not defined.
     
  2. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    258
    Likes Received:
    29
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Hi @Petar,

    When this happens, have you checked the `/usr/local/cpanel/logs/error_log' error log?:
    Code:
    # tail -fn0 /usr/local/cpanel/logs/error_log
    
    When viewing a preview, a template file is generated as below:
    Code:
    # ls -1  /var/cpanel/webtemplates/root/english/*
    /var/cpanel/webtemplates/root/english/default-preview.tmpl
    /var/cpanel/webtemplates/root/english/moving-preview.tmpl
    /var/cpanel/webtemplates/root/english/redirect-preview.tmpl
    
    The '/root/' portion will change depending on your reseller. This is likely a permissions issue. The permission should be as below:
    Code:
    755 root:root(0:0) directory /var
    711 root:root(0:0) directory /var/cpanel
    711 root:root(0:0) directory /var/cpanel/webtemplates
    711 root:root(0:0) directory /var/cpanel/webtemplates/root
    711 root:root(0:0) directory /var/cpanel/webtemplates/root/english
    
    Can you check the permissions on this path?

    Thanks,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Petar

    Petar Member

    Joined:
    Apr 5, 2017
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Serbia
    cPanel Access Level:
    Root Administrator
    Thank you on reply, I'm resolved on this way.

    Move all file from /var/cpanel/webtemplates/root/english/
    except default-preview.tmpl in some temp location.
    After that preview works !
     
  4. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    258
    Likes Received:
    29
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Thanks for sharing your solution @Petar. I am glad to hear all is working well
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice