Magento module works well on localhost but not on live server - php

I have a weird case here....
I'm making a simple magento module right now. Some kind of script injection module (similar to google analytics module). I've built the admin config for that module (which is defined from system.xml)
as seen on the image. This module works very well on my localhost. But it's getting weird on the live server. The modules looks like it doesn't enabled at all although I have totally make sure it's all already enabled. Both via magento admin area and also via app/etc/modules. That admin config area never appear on live server's magento installation.
does anybody know what's the issue with this problem?
or at least tell me how and where should I debug it? I've been digging it to magento core code but getting stuck on getSingleton() function somewhere around magento core code. I don't understand that way-too-MVC stuff :p
I would be very glad if someone could explain and guide me on this
thanks :)

The most common problems are associated with case sensitivity. If you have Windows hosting, then the error in the uppercase/lowercase characters is not visible and it works. But as soon as it gets to linux hosting, the module will not work.
Check the paths in the settings and folders/files - so that they match.

Usually there are three things:
typos in xml files (validate them with validator)
cache is not cleared after installation (clear cache)
ACL rules are not reinitiated (re-save admin roles)

If you adjust the layout/add your own layout in the backoffice of magento, it's best to clear the cache (remove everything in the var/cache/ folder) and to logout and re-login.

Thumb rules while deploying magento custom module on the live server-
Deploy your custom module
Flush your all magento cache or at-least refresh them
[System->Cache Management]
If you have enabled compilation re-run the compilation or disable compilation until the testing is done.
[System-Tools->Compilation]

Related

Shopware Basic settings are not displayed ("Basic settings are loading")

I installed the Shopware 5.4.6 community shop.
I now wanted to make changes in the basic settings what is answered with "Basic settings will be loaded" (BTW i use german version so i got "Grundeinstellungen wird geladen").
All other points can be displayed without problems.
PHP Version 7.0.31, Linux 3.16.0-6-amd64, Apache, Shopware 5.4.6
backend UI shows no errors in Shopware logs
backend UI shows shows nothing in the system log.
Resolved / Done / Solved / Workaround:
Tried different things. Also read the apache error logs. did not help.
How I got it work:
have uploaded and installed a fresh shop in a subfolder of the shop. this time the basic settings were accessible.
So I just wanted to give it a try again (in the home folder)
So i deleted (all inside the shop home) and uploaded again. istalled. and even then the basic settings were accessible.
I noticed:
during these installations the assigned rights for individual files were no longer required / required / remindet during the installation.
may because I had recursively set writing permissions in the shop folder (sometime yesterday when trying around).
I have not tested now if the error occurs again, if I do not give this home folder at the beginning writing permissions recursivly for php. uploaud just takes too long at this lame server. it took a whole hour to empty the content folder (FTP access).
Too bad the shopware 5.4.6 could had no error messages. Maybe too rare a case.

WordPress Manual Install Theme/Display Issue

My Problem
I manually installed WordPress on a Debian 9 VM in Virtual Box on a Windows 10 machine. When I pull up the website, this is what I get:
A WordPress site with just HTML, no formatting
The point of this install was to learn how to make a custom WordPress theme. I have built child themes before, but never a theme from scratch, so it may be I don't have everything set up yet. But there is a second issue is WordPress does not give me an option to select my second theme either.
What I did
To set up the site, I followed this tutorial on setting up WP on a Debian system. I sort of touched up on this, but I am new to WP development. I thought this was a quick and dirty route to set up a WP install. I don't have the knowledge of WordPress to know if there is an error in this setup guide.
Again, I checked the themes folder. I could not find the custom theme I started to build as an option. I can't currently download themes straight from WP because I don't have an FTP server/client currently installed on my machine. If it were just the inability to choose a WordPress theme from the WordPress theme repository, I'd suspect it's the FTP setup. But, I also can't choose my custom theme. So is there something wrong with the install?
Summary
I can't get any formatting to work on my WP development site. I suspect it's some problem with themes, but I don't know enough about the internals WordPress to know how to diagnose the problem.
Thank you for your time
It's tough to say without seeing your setup exactly, but this is often caused by URL problems.
Are you able to access wp-admin? If so, try logging in and visiting the settings > permalinks page, then just hitting the save button.
Try reloading your site. It might be fixed.. If not, a little more to try. First, I'd open your browser's Console / Inspect mode, and see if there are any console errors (showing CSS files not loading, etc). If so, post them here.
Additionally, I found a helpful article that details some other things to try when this problem pops up:
http://wphelp24.com/how-to-fix-wordpress/how-to-fix-wordpress-css-not-loading/

Problems with adding an extension in Magento Root directory?

Not sure if i'm at the right place but oh well,
Since a month or two I've started working at a company which uses Magento. Everything was going smoothly, except for the fact that I now try to add an extension to the root directory of Magento through cPanel, in the installation guide I found the following steps:
Installation:
Before installing the extension, please make below notes complete:
Clear your website cache under located at var/cache directory.
If you’re installing extension on live website, please backup your store database and web directory.
Disable Compilation by going to Admin Control Panel -> System -> Tool -> Compilation.
Multi PRODUCT EDITOR Installation:
Extract Multi_Product_Editor-1.0.0.tgz file.
Upload the extracted folders (/app, /js, /skin) respectively into the root of your Magento installation.
From the Admin Control Panel, refresh cache at System => Cache Management. Log out and log in back
now I have found a problem with uploading the extracted folders, because
There are already a folder called App and one called Skin and I'm not sure if I should overwrite those
When I wanted to upload the specific folders, it can't, I can't upload the folder "App" and it only allows me clicking the folder and searching through the folder's folders.
I'm still new to Magento but I learn everyday! please tell me if I'm doing something wrong or if I need to take a step back, I gladly appreciate all your help!
Also, if I wasn't specific enough, or if you need more details, just say so and I'll try adding as much as I can :)
kind regards
Clay
In magento app and skin are mandatory folders so you must not erase them. But if your module you want to add is adding properly, it will just add based on magento structure and create a new module in community or local for the app, and a new design in skin.
Be always careful of where the modules installs things anyway

Magento not valid template file:adminhtml\base\default\template\login.phtml

I have been debugging Magento Admin using PHP Storm these days and it's OK all the time. But today I came across this problem all of a sudden.
I have tried below but it didn't work.
Restart PHP service
Clean Magento cache
Revert all my local changes (these changes are just for custom module, no system change included)
Restart my PC
I also googled but no clue found. As far as I know, base directory is not involved in Magento admin login.
So any idea about it?
The solution for me, was also as the last comment:
I checked the commit history of directory
adminhtml\default\default\template\ and found someone deleted
login.phtml !
So i created a new login.phtml in adminhtml\default\default\template\ and then i copied content from the basic login.phtml file and it now works.

Reading error logs in Magento CE without access to the Administrative Panel

Recently installed magento on an nginx web server. After sorting out a few issues with php5-fpm I managed to install magento. Every page now 404s (with the magento 404 template). I want to get to the root of the problem but magento isn't producing a system.log and nginx isn't bringing up any errors.
Magento seems to be writing to the /tmp/magento/var folder. The only subfolders of var are 'cache' and 'session' neither of which contains the useful 'system.log'.
I have looked around and cannot find a way of activating the log without having access to the control panel (every page 404's so I cannot access it).
Very annoying, considering the 404 problem is too generic to be tackled without a system log.
Any help would be appreciated.
Two issues
If Magento is writing the cache to /tmp/magento then you have a serious file/folder permission issue that needs to be addressed from the SSH command line
Can't change Magento base URL, stuck in cache - despite its name, addresses the issue
Changing the Magento logging from outside requires PHPMyAdmin or SSH mysql access to the database. The controls are found in the core_config_data table.
Look for the path dev/log/active for however many scopes you're using and set to 1 (default scope if you've never set anything else up)
Also make sure that dev/log/exception_file and dev/log/file are filled in with proper file names.

Categories