e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Bug]: Second template file not loading with e107::getTemplate #5245

Closed rica-carv closed 1 month ago

rica-carv commented 1 month ago

What e107 version are you using?

v2.3.3, Latest Github version (just updated)

Bug description

I'm building a plugin, and i want (or need) two different template files: plugin_template.php & plugin_view_template.php

Somehow, i'm unable to load plugin_view_template.php with e107::getTemplate('plugin_view', 'plugin_view'), or any other variant, as matter fact. But i can load plugin_template.php with e107::getTemplate('plugin', 'plugin')....

Both templates are on the template folder, so what i'm doing wrong here? Or there's indeed a bug????

How to reproduce

Create two templates on template folder: plugin_template.php & plugin_view_template.php Create two php files on main plugin folder. In one of them, try to load template plugin_template.php with e107::getTemplate & on the other try to load plugin_view_template.php with e107::getTemplate The plugin_view_template.php won't load.

Expected behavior

I expected to be able to load diferent templates in diferent files of the plugin...

What browser(s) are you seeing the problem on?

Firefox

PHP Version

PHP 7.4

Jimmi08 commented 1 month ago

Try getTemplate('plugin', "plugin_view"); and be sure that your template has correct array - $PLUGIN_VIEW - used.

rica-carv commented 1 month ago

Yes, my template has correct array $PLUGIN_VIEW.....

I'm scavenging for grammar issues... I hate these little bugs...

rica-carv commented 1 month ago

Forget it, somehow today is working... without any changes in code! Weird...