Template Builder

Hello. I’m from Brazil and we’re implementing Gibbon in a higher education school in the state. Congratulations on the Gibbon project. I’m trying to use Template Builder but no template appears. Could you help me? I have already checked the directories and access permissions, as already indicated by you in this Forum.

Hi Alessandra, welcome to the Gibbon community, great to hear you’re getting up and running with Gibbon for your organization.

To confirm, have you clicked the Scan Asset Directories button (the gear icon) and the files are still not showing up? If that’s the case, be sure to check the permissions of not only your uploads folder but also the modules/Reports/templates folder, as this is where the default templates are stored. Hope that helps, otherwise let us know which OS you’re using and versions of Gibbon, PHP, and MySQL, to help troubleshoot.

Hello. Thanks for the feedback. I’m using XAMPP. Gibbon V. 24.0.0 PHP 8.1.6 and MySQL Versão
10.4.24. I clicked the Scan Asset Directories. The permissions are ok. Below the system screens. Thanks

Hi Alessandra, thanks for the additional info. We’ve had some people run into trouble with asset scans when using XAMPP in the past, and although we thought we’ve fixed the issue, it looks like there may still be something that isn’t working as expected. I don’t have access at the moment to test using an XAMPP system, however it looks like the glob function might be part of the issue, so I’ve refactored that script to use a different method to scan the directory. If you apply these changes to your system, can you test them and let me know if it works? Thanks, the updated file can be found here: https://github.com/GibbonEdu/core/commit/01c5335458ce7883e807ff6e5733e9b9191c1c37

Hi!! When I clicked the Scan Asset Directories button, an error occurs.

This error occurred after the update de file

Hmm, this is odd, it looks like it may be related to how the directory paths and slashes are being handled. Can you please check in System Settings to ensure that your Base Path (the absolutePath in the gibbonSetting table) does not end with a \ or / character. I’m seeing that it looks like it has a trailing slash in the error message, which isn’t compatible with the UNIX-style directory separators.

Hi. Thanks. I removed the slash from the end of the Base Path and still with error.

and still with error.

Hi Alessandra, I’ve made one more tweak to hopefully deal with the leading slash issue as well, which you can find here: https://github.com/GibbonEdu/core/commit/9879b5c8511229e7acd39500fe47f9d6999e19eb I’m unable to test it myself, but if you’re able to check out this fix and let me know how it goes, it appears to be a plausible fix based on the error message.

Hi Sandra! Initially it gave a syntax error due to whitespace after the characters “$” and "" .

$ iterator = new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ directoryPath , FilesystemIterator :: SKIP_DOTS ), \ RecursiveIteratorIterator :: CHILD_FIRST );

I removed the blanks and it worked correctly!!

Thank you so much for your help . Alessandra.

Great to hear it’s working! The spaces aren’t there in the file itself, so perhaps a copy-paste error. Be sure to get the full copy of the file here: https://github.com/GibbonEdu/core/blob/9879b5c8511229e7acd39500fe47f9d6999e19eb/modules/Reports/templates_assets_scanProcess.php