I've been working on a plugin for Magento, and I have one global block with no xml tags outside of it in my layout/name.xml file as such:
<block name="one.two.three" template="project/button.phtml" />
The idea is to be able to call getBlockHtml("one.two.three") anywhere and be able to see the beta.phtml. I got this working no problem.
To test through my plugin's installation process, I tried installing another magento from scratch. I installed my plugin into the same directories as the first and copied/pasted the getBlockHtml from my older install, and nothing appears (not even the template hint)! Adding default references didn't help.
It's obviously not detecting my xml files, though the adminhtml menu and the mysql install script both work. Any idea why this would be? And yes, I have cleared cache countless times.
Edit:
Both installations are version 1.7.0.2
Both of these installations are on the same computer, so their filesystems and casing are presumably identical. Is it ever the case when two on the same computer could differ in case sensitivity?
Installing plugin: We have a script that copies files into the Magento installation, which has been working so far with the first installation, and is what I have been doing with the second ins. To confirm, the entries and tables in the magento database are added when the files are copied over.
My layout is stored in a general layout folder: app/design/layout/projectEmbeds.xml. I realize this is not common convention but it was like this before I got to this project, and it was working so I didn't mess with it. I assume this decision was made so it would appear independent website theme.
Similarly, my plugin is stored in app/code/local/ -> Project/Embeds, which contains Blocks, controllers, etc, Helper, Model, and sql as it should.
The button.phtml in question is located in app/design/frontend/default/default/project
My config.xml file stored in etc in the above directory is as follows. Anything referencing Project_Banner is important and the Project_Embed one is almost entirely deprecated.
<config>
<modules>
<Project_Embeds>
<version>0.1.0</version>
</Project_Embeds>
</modules>
<frontend>
<routers>
<embeds>
<use>standard</use>
<args>
<module>Project_Embeds</module>
<frontName>embeds</frontName>
</args>
</embeds>
</routers>
<layout>
<updates>
<embeds>
<file>projectEmbeds.xml</file>
</embeds>
</updates>
</layout>
</frontend>
<global>
<resources>
<project_embed_setup>
<setup>
<module>Project_Embeds</module>
<class>Project_Embeds_Model_Mysql4_Setup</class>
</setup>
</project_embed_setup>
</resources>
<models>
<embeds>
<class>Project_Embeds_Model</class>
<resourceModel>embeds_mysql4</resourceModel>
</embeds>
<projectbanner>
<class>Project_Banner_Model</class>
<resourceModel>banner_mysql4</resourceModel>
</projectbanner>
<embeds_mysql4>
<class>Project_Embeds_Model_Mysql4</class>
<entities>
<embeds>
<table>project_embed</table>
</embeds>
<banner>
<table>project_banner</table>
</banner>
</entities>
</embeds_mysql4>
</models>
<resources>
<embeds_setup>
<setup>
<embeds>Project_Embeds</embeds>
</setup>
<connection>
<use>core_setup</use>
</connection>
</embeds_setup>
<embeds_write>
<connection>
<use>core_write</use>
</connection>
</embeds_write>
<embeds_read>
<connection>
<use>core_read</use>
</connection>
</embeds_read>
</resources>
<blocks>
<embeds>
<class>Project_Embeds_Block</class>
</embeds>
</blocks>
<helpers>
<embeds>
<class>Project_Embeds_Helper</class>
</embeds>
</helpers>
</global>
<admin>
<routers>
<thisprojectname>
<use>admin</use>
<args>
<module>Project_Embeds</module>
<frontName>project</frontName>
</args>
</thisprojectname>
</routers>
<!-- default admin design package and theme -->
<design>
<package>
<name>base</name>
</package>
<theme>
<default>default</default>
</theme>
</design>
</admin>
<adminhtml>
<menu>
<embeds translate="title" module="embeds">
<title>Project</title>
<sort_order>9999</sort_order>
<children>
<projectbanner module="embeds">
<title>Edit Coupon</title>
<sort_order>1</sort_order>
<action>embeds/adminhtml_banner</action>
</projectbanner>
</children>
</embeds>
</menu>
<layout>
<updates handle="index_settings">
<embeds>
<file>projectEmbeds.xml</file>
</embeds>
</updates>
</layout>
</config>
Try adding the projectEmbeds.xml file in your theme used i.e default i guess
So add in
/app/design/frontend/default/default/layout/
and call the block inside
<default></default>
Let me know if it helps..