Menu

image brick extension tile and layout templates not defined!

Rita
2020-07-12
2020-07-20
  • Rita

    Rita - 2020-07-12

    Have a good day,
    I have installed the extension of image brick "sample-portal-dev-new-brick"
    and I'm getting the following error when I load the portal home page:
    Template "sample-portal-dev-new-brick/tile.html.twig" is not defined.
    and this error when requesting the new brick
    Template "sample-portal-dev-new-brick/layout.html.twig" is not defined.

    I guess there should be some tags in the XML file that define tile and template but I don't know them can you help me?

    Thank you

     
  • Pierre Goiffon

    Pierre Goiffon - 2020-07-13

    Hello,
    What iTop version are you using ?
    From where did you get the sample-portal-dev-new-brick module ?

     
  • Rita

    Rita - 2020-07-13

    iTop version 2.6.0
    and I got it from github:
    https://github.com/Combodo/sample-portal-dev-new-brick

     
  • Pierre Goiffon

    Pierre Goiffon - 2020-07-16

    Hello,
    I've just tryed on the support/2.6 branch but didn't reproduced.
    Did you made any change to the extension ? Try compare your files from the one on GitHub...

     
  • Pierre Goiffon

    Pierre Goiffon - 2020-07-16

    Also 2.6.0 is an old version, you should update to a more recent one : https://sourceforge.net/projects/itop/files/itop/

     
  • Rita

    Rita - 2020-07-16

    Hello Pierre,
    No I didn't change files I just installed the extension as it is from Github and got this error message in the attached picture.
    I have searched the error and it looks like it's related to Twig Loader and how to include the paths of templates .
    In the extension the paths of the templates are given in the file: imagebrick.class.inc.php lines 10 & 11:
    const DEFAULT_PAGE_TEMPLATE_PATH='sample-portal-dev-new-brick/layout.html.twig';
    const DEFAULT_TILE_TEMPLATE_PATH='sample-portal-dev-new-brick/tile.html.twig';
    but twig loader can't see them in this path I don't know why!

    I'm going to update to new version soon specially for the nested select OQL statments :).
    Thanks for helping me, I appreciate it.

     

    Last edit: Rita 2020-07-16
  • Pierre Goiffon

    Pierre Goiffon - 2020-07-17

    Please describe step by step what you did with the zip you've downloaded ?

     
  • Rita

    Rita - 2020-07-19

    I have extracted it and copied the "sample-portal-dev-new-brick" folder to the extensions folder of iTop then I run setup and checked the extension to be installed..
    after the setup is done I get the welcome page and I choose to go to standard portal from the right menu and I get the error.

     
  • Pierre Goiffon

    Pierre Goiffon - 2020-07-20

    Hello,
    I'm not sure of what can cause this issue. Without having a way to reproduce it, I won't be able to help :/

     
  • Rita

    Rita - 2020-07-20

    Dear Pierre,
    Problem solved :)
    there was a problem with the paths of the templates;
    as I mentioned before the paths of the templates are given in the file: imagebrick.class.inc.php lines 10 & 11:
    const DEFAULT_PAGE_TEMPLATE_PATH='sample-portal-dev-new-brick/layout.html.twig';
    const DEFAULT_TILE_TEMPLATE_PATH='sample-portal-dev-new-brick/tile.html.twig';
    need to make sure that when you download the Zip file it will have "sample-portal-dev-new-brick-develop" name and default templates are given as"sample-portal-dev-new-brick" just add -develop or rename the extension folder it will solve it :')

    Best Regards

     
  • Pierre Goiffon

    Pierre Goiffon - 2020-07-20

    Oh ok, I didn't though of that ! Thanks for the feedback !

     

Log in to post a comment.

MongoDB Logo MongoDB