i tried like all tutorials out there and i still cannot get a custom created module to work in Magento.
This is the path where i created the XML file on the server to tell Magento what the module is:
app/etc/modules/Multiplies_HelloWorld.xml
<?xml version="1.0"?>
<config>
<modules>
<Multiplies_HelloWorld>
<active>true</active>
<codePool>local</codePool>
</Multiplies_HelloWorld>
</modules>
</config>
This is the module path:
app/code/local/Multiplies/HelloWorld/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Multiplies_HelloWorld>
<version>0.0.1</version>
</Multiplies_HelloWorld>
</modules>
</config>
when i go to System/Configuration/Advanced i see a whole bunch of other modules except mine.
I tried to flush the cash, disable it, clear it manualy, restart browser, relog but still no module in my list.
The version im using is magento 1.7.0.2 (free)
Im using FileZilla to upload files.
Any suggestions would be really appreciated.
This may be a bit late, but I was just having this same problem.
After 20 minutes of chin scratching I tried resetting all caches (System > Cache Management) and then it popped up!
I'm disabling the "configuration" cache while heavily developing a module. I think that'll help reduce friction.
Make sure your etc/module.xml looks like this:
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="OrgName_ModuleName" setup_version="1.0.0">
</module>
</config>
Make sure your composer.json has this:
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"OrgName\\ModuleName\\": ""
}
}
Make sure your registration.php looks like this:
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'OrgName_ModuleName',
isset($file) && realpath($file) == __FILE__ ? dirname($file) : __DIR__
);
If your module is contained in a symlinked directory that is outside of magento root directory (happens when you use local "path": as a module's repository description in composer), you have to allow magento for symlinks with: bin/magento config:set dev/template/allow_symlink 1 . See https://magento.stackexchange.com/a/315525/88882 for more info.
Related
I am pretty new to neo4j. In my graph, there are more than 5k nodes and neo4j browser doesnt show all the nodes, as there seems to be a limit and picture is messy as well.
So i was trying to gephi 0.9 and installed the same.
But I am unable to find the neo4j database plugin. I checked under
Tools --> plugins --> available plugins section
Please let me know, if I am missing something here.
Plugin screenshot
Thanks in advance.
You don't actually need the Neo4j plugin for Gephi, as you can use neo4j-shell-tools instead to do a GraphML export, and open that in Gephi.
Beware that the option parsing of export-graphml is a bit buggy (and I should open an issue about it); if you want to use the -t or -r flags, they have to be specified before -o, like this:
export-graphml -r -o out.graphml match ...
I also had to add some metadata description to the GraphML file so Gephi finds more data (and I should also open an issue about that, at least for the generic metadata). The beginning of the file looks like
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<graph id="G" edgedefault="directed">
which I changed to
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key attr.name="label" attr.type="string" for="node" id="labels"/>
<key attr.name="label" attr.type="string" for="edge" id="label"/>
<key attr.name="someProperty" attr.type="boolean" for="node" id="someProperty"/>
<!-- more descriptions of node properties -->
<graph id="G" edgedefault="directed">
I installed my custom extension via composer.
I can confirm that app/code/vendor/package_name generated on the server by composer.
However,on admin panel under stores/configuration/advanced I can not see my extension.
What I've tried so far are as following ;
Flushing Magento 2.0 cache and disabling caching
Changing extension file permissions to 777
Deleting files under var/cache manually
Logging out and logging in again
None of them solved my problem.
How can I see my custom extension under admin stores / configuration / advanced on Magento 2.0 ?
I am not sure if it any helps but I posted my config.xml and module.xml
Thanks in advance,
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Fusion_CODFee" schema_version="0.0.1"></module>
</config>
<?xml version="1.0" ?>
<config>
<modules>
<Fusion_CODFee>
<version>0.1.0</version>
</Fusion_CODFee>
</modules>
</config>
According to me setup_version is missing from module.xml. It should be like this :
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Fusion_CODFee" schema_version="0.0.1" setup_version="0.0.1"></module>
</config>
you shoul try php bin/magento setup:upgrade command so that your magento upgrade itself with the new extension, also check for config.php in app/etc folder ,your module should be there if is active in case it is not then under array() tag add this "Fusion_CODFee=>1" and then run upgrade command in your rootdirectory, it might help you.
I've tried following code that's working for me please have look
Fusion\CODFee\etc\module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Fusion_CODFee" setup_version="2.0.0">
</module>
</config>
Now next you have to register your module with registration.php
create registration.php under Fusion\CODFee\registration.php and put below code inside it.
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Fusion_CODFee',
__DIR__
);
Now clearing you cache and if still not working then fire below command from your root directory of magento installation
If your system is ubuntu then => sudo php bin\magento setup:upgrade or for window system remove sudo
then change permission and that's it
Let me know if still have any query
I encouraged to post a question here for the first time, so here it goes!
I'm trying to overwrite Magento core class for the first time; Mage_CatalogInventory_Model_Stock_Item located # /app/code/core/Mage/CatalogInventory/Model/Stock/Item.php, but for some reason I'm not having any success as executing;
$object = Mage::getModel('cataloginventory/stock_item');
var_dump(get_class($object));
outputs
string 'Mage_CatalogInventory_Model_Stock_Item' (length=38)
I created a new directory under /app/code/local/Rage and copied the Item.php to /app/code/local/Rage/CatalogInventory/Model/Stock/Item.php renaming it to
class Rage_CatalogInventory_Model_Stock_Item extends Mage_CatalogInventory_Model_Stock_Item { ... }
I also made a couple of xml files. One to app/etc/modules/Rage_CatalogInventory.xml, which contains following;
<?xml version="1.0"?>
<config>
<modules>
<Rage_CatalogInventory>
<active>true</active>
<codepool>local</codepool>
</Rage_CatalogInventory>
</modules>
</config>
and another to app/code/local/Rage/CatalogInventory/etc/config.xml;
<?xml version="1.0" ?>
<config>
<modules>
<rage_cataloginventory>
<version>0.0.1</version>
</rage_cataloginventory>
</modules>
<global>
<models>
<cataloginventory>
<rewrite>
<stock_item>Rage_CatalogInventory_Model_Stock_Item</stock_item>
</rewrite>
</cataloginventory>
</models>
</global>
</config>
I just can't make it work even after a couple of hours trying... This is driving me crazy. Hope you can help me out!
Many many thanks in advance.
EDIT: Fixed config.xml as Amit pointed out. It turned out that Magento had compiler in use. I figured out that could've something to this. So disabled that and cleared the includes/src -folder contents, but still nothing is happening...
issue in config.xml and here rage_cataloginventory should be Rage_CatalogInventory and here total config.xml
<?xml version="1.0" ?>
<config>
<modules>
<Rage_CatalogInventory>
<version>0.0.1</version>
</Rage_CatalogInventory>
</modules>
<global>
<models>
<cataloginventory>
<rewrite>
<stock_item>Rage_CatalogInventory_Model_Stock_Item</stock_item>
</rewrite>
</cataloginventory>
</models>
</global>
</config>
Ok, this is just a guess and don´t be mad if i pointed something out that was clear to you;)
However: You did clear the config-cache, right?
(And keep the compiler disabled for development-environment, that saves you from some trouble if you forget that you have it active.)
The xml so far looks very correct to me, so that shouldn´t be the issue.
What to check:
Is the module loaded at all? (See under System->Config->Advanced)?
Is it working with any other model or just this one?
Any log output that gives a hint as to maybe the config.xml has an error (hidden chars etc.)?
I have setup already joomla 3.1.4 and I tried to install a plugin,But Im getting this error:
JInstaller: :Install: Cannot find Joomla XML setup file
This is my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.5/template-install.dtd">
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
<filename>helloworld.xml</filename>
</files>
</extension>
You do not need to specify "helloworld.xml" in your xml file.Remove file and install again.This will be your final xml file-
<?xml version="1.0" encoding="UTF-8"?>
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
</files>
</extension>
Hope this will help.
The "Cannot find Joomla XML setup file" usually means you are trying to install an extension that wasn't designed for the version of Joomla you are installing to.
Read more here
In your opening <extension> tag, you do not need to specify a client attribute.
Where is the XML file in relation to your ZIP package? If it isn't at the top level of the ZIP, it won't be found.
Generally when this happens something is wrong with the XML file. If you have made any changes, try to think where those changes were and find a problem with the XML file.
Problems could be:
No opening or closing tag. Closing tags are easy to miss. Count them, make sure there's an opening and a closing tag.
Duplicated tags. It's easy to add two labels or showons for example, especially if you are copying and pasting.
Space before the opening XML tag
No closing fieldset tag
No closing extension or config tag. Easily deleted if you are replacing the file
You can easily use a tool like this:
https://www.w3schools.com/xml/xml_validator.asp
Which will help you to find issues such as missing opening and closing tags.
I followed a tutorial from Alan Storm on creating a basic Hello World module for Magento. After some initial problems I got it working. Today I have gone to try and expand on that and the module no longer works(I get a 404 page not found message), I have not changed any code within that module or deleted any files.
The only thing that I can think I did since first creating the module and now is go into Magento's admin screen and make some adjustments - which i've tried changing back, but I still get the 404. I also have few other basic modules that I have been working on, but they also seem to no longer work.
I have checked System > Configuration > Advanced and the modules are all still enabled
Can anyone see something in my code that would stop this module from not being found when I vist http://magentotest.local/helloworld
app/etc/modules/As_Helloworld.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<As_Helloworld>
<active>true</active>
<codePool>local</codePool>
</As_Helloworld>
</modules>
</config>
app/code/local/As/Helloworld/controllers/IndexController.php
class As_Helloworld_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction() {
echo 'Hello Index!';
}
}
app/code/local/As/Helloworld/etc/config.xml
<config>
<modules>
<As_Helloworld>
<version>0.1.0</version>
</As_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>As_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
1-Would changing options in the admin area be able to stop a module working?
2-If so where do I start looking to fix the problem
3-What can I do to prevent it from happening again?