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!

DomainInfo::list_domains UAPI Call Not working from index.html.tt

Discussion in 'cPanel Developers' started by morissette, Jun 23, 2015.

  1. morissette

    morissette Well-Known Member

    Joined:
    May 24, 2009
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    Austin, TX
    cPanel Access Level:
    Root Administrator
    <!-- Main Content -->
    <div class="container addtop-margin">
    <div class="panel panel-default">
    <div class="panel-body">
    Why does the UAPI just not work :P
    [% data = execute( 'DomainInfo', 'list_domains' ); %]
    [% FOREACH q = data.addon_domains %]
    [% q %]
    [% END %]

    </div>
    </div>


    I have just added 3 addon domains and yet there is nothing in cpanel error log and nothing displaying on the page. The code was just copied and pasted from the docs.

    Please point me in the right direction.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. morissette

    morissette Well-Known Member

    Joined:
    May 24, 2009
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    Austin, TX
    cPanel Access Level:
    Root Administrator
    Alright I found out the issue by dumping the hash:

    need to loop through data.data.addon_domains
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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