Changing default theme give Uncaught Twig_Error_Loader in opencart - opencart

Fatal error: Uncaught Twig_Error_Loader: Unable to find template "common/column_left.twig" (looked into: C:/xampp/htdocs/projects/retail/upload/catalog/view/theme). in C:\xampp\htdocs\projects\retail\upload\system\library\template\Twig\Loader\Filesystem.php:215 Stack trace: #0 C:\xampp\htdocs\projects\retail\upload\system\library\template\Twig\Loader\Filesystem.php(139): Twig_Loader_Filesystem->findTemplate('common/column_l...') #1 C:\xampp\htdocs\projects\retail\upload\system\library\template\Twig\Environment.php(312): Twig_Loader_Filesystem->getCacheKey('common/column_l...') #2 C:\xampp\htdocs\projects\retail\upload\system\library\template\Twig\Environment.php(378): Twig_Environment->getTemplateClass('common/column_l...', NULL) #3 C:\xampp\htdocs\projects\retail\upload\system\library\template\twig.php(33): Twig_Environment->loadTemplate('common/column_l...') #4 C:\xampp\htdocs\projects\retail\upload\system\library\template.php(51): Template\Twig->render('common/column_l...', '1') #5 C:\xampp\htdocs\projects\retail\uploa in C:\xampp\htdocs\projects\retail\upload\system\library\template\Twig\Loader\Filesystem.php on line 215
How to fix it. Please help

Could be of help
Twig has caching, which is super annoying when you're developing. You can turn off the caching by going to the admin Dashboard area, and clicking the gear icon in the upper-right corner. You can turn the caching off (and refresh it) in there.
put your original file back and clear the TWIG Cache
This Solution from opencart : https://forum.opencart.com/viewtopic.php?t=186585

Related

Facebook Login Error Code 1 Sub code 1357045

I have implemented a login with facebook method in my website. Originally it works fine, but suddenly this past few days it won't work anymore, even tough I don't change any source code or settings. After some tracing, I found the problem is when I call FB.api /me? it returns this error:
Error Code 1
Error Sub Code 1357045
Message Unknown Error (empty response)
Type Http
Status 0
Does anyone can help me, please ??
FIXED:
Problem solve at this thread Facebook Login JAvascript SDK, Content Securty Policy
Also this error can be because of some extension added to your browsers such as addBlock, Ghostery etc. In my case it was Ghostery.

ionic2: How to change orientation of a single page landscape in app other pages portrait?

in my app, there has a page need to show in landscape,others show in portrait,i use ScreenOrientation plugin
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
has no effect when i run on phone and throw some exception
"Error: Uncaught (in promise): NotSupportedError: screen.orientation.lock() is not available on this device.
how can i do? thank you very much for helping me.
Try this.
this.platform.ready().then(() => {
this.screenOrientation.unlock();
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
});

Debugging Ember.js errors: Error while loading route

While in any particular case there are hints and clues on how to debug an error you get, I haven't really found a general Ember strategy.
For example, a typeError while loading a route:
Assertion failed: Error while loading route: TypeError: 'undefined' is not an object (evaluating 'window.router.lander') (ignore the fact that I'm trying to access window.router.lander. It's irrelevant)
Why does Ember not tell you which route it's loading when this error happens? Or whether it happens in afterModel(), or activate()? And what's the general strategy for finding that sort of context info?
So far all I've got is adding a bunch of console.logs scattered around. For example with the error above:
1) Find all occurrences of window.router.lander in my code
2) before the first occurrence, add a console.log('is it the first occurrence?'), and after the first occurrence put a console.log('its not the first occurrence')
3) Do the same for every occurrence
4) refresh. One of the 'is it the nth occurrence?' won't have a closer, and now you know where the error happened.
For better debugging, you can enable transitions logging by create app with LOG_TRANSITIONS and/or LOG_TRANSITIONS_INTERNAL properties:
window.App = Ember.Application.create({
// Basic logging, e.g. "Transitioned into 'post'"
LOG_TRANSITIONS: true,
// Extremely detailed logging, highlighting every internal
// step made while transitioning into a route, including
// `beforeModel`, `model`, and `afterModel` hooks, and
// information about redirects and aborted transitions
LOG_TRANSITIONS_INTERNAL: true
});
Referenece: http://emberjs.com/guides/understanding-ember/debugging/
Also, you can use canary build which provide detailed error stack:
http://emberjs.com/builds/#/canary
Ember isn't particularly helpful when it comes to errors in the model hook, or the promises it returns. I'm sure I've read in one of the issues (or http://discuss.emberjs.com/ I'm not sure) that this is an open issue in which they're working.
What I do is use the Chrome Developer Tools to debug the issue (instead of just console loggin it). From my experience it's usually:
you're not returning anything in the model hook
an error inside one of the then functions on the promise the model hook returns
I hope it helps you!

magento Not valid template file /page/1column.phtml

I had my site running fine on the devp. server. After I migrated the app to my production server. Everything worked until I added an extension and enabled it. The site still works but the product view page doesn't show up. Everytime I click on the product view page, this error is appended to my log file...
CRIT (2): Not valid template file:frontend/base/default/template/page/1column.phtml
I have checked the file it is alright, just same as the one working on the development server. I've tried disabling the only plugin (custom menu) that I have and still the problem persists. I've tried increasing memory_limit but it doesn't help either.
Please help, I am stuck in the middle of nothing.
A common cause of this error is the use of symlinks without enabling this in the admin area…
System > configuration > developer > Template Settings
The error gets triggered in app\code\core\Mage\Core\Block\Template.php around line 243 ( see here ) - so if its not an issue with symlinks then this would be a good place to start debugging.
If you are not using xDebug then where the exception gets caught around line 250 you should either log or var_dump the values of:
$includeFilePath
and
$this->_viewDir
Then make sure they both exist (paying attention to the case)
Failing that you might want to look at permissions.
UPDATE core_config_data SET value = '1' WHERE path = 'dev/template/allow_symlink';
or
INSERT INTO core_config_data (scope, scope_id, path, value) VALUES ('default', 0, 'dev/template/allow_symlink', '1');

Accessing Firefox tab element in nsIWebProgressListener::OnStateChange using C++

I am developing extension for Firefox 3.0-3.5 versions using VS2008.
I want to set attribute to a tab once the document load request completes within that tab window.
So in OnStateChange method, I am checking for document load.
I have used STATE_STOP & STATE_IS_DOCUMENT for it.
I want to determine which tab window has been associated with particular document request.
I have valid DOM Document pointer got from nsIWebProgress *aWebProgress which is 1st input
parameter of OnStateChange.
if ((aStateFlags & STATE_STOP) && (aStateFlags & STATE_IS_DOCUMENT))
{
nsCOMPtr<nsIDOMWindow> domwin;
nsCOMPtr<nsIDOMDocument> domDoc;
aWebProgress->GetDOMWindow(getter_AddRefs(domwin));
domwin->GetDocument(getter_AddRefs(domDoc));
}
I have tried to get nsIDOMDocumentXBL pointer by QIing nsIDOMDocument pointer(domDoc in my example) but it fails with Error code 0x80004002 (2147500034) i.e.NS_ERROR_NO_INTERFACE.
How do I get the tab element corresponding to document load request.
Could any one please help me?
Thanks in Advance,
Vaibhav D. Gade.
IF I understood the question correctly and you want a for a content window, you probably need https://developer.mozilla.org/en/Working_with_windows_in_chrome_code#Accessing_the_elements_of_the_top-level_document_from_a_child_window to get the chrome window, then run the implementation of gBrowser.getBrowserForDocument in the chrome window.
You'd save yourself a lot of time if you stopped writing C++ and switched to JS for such things.