I am creating the child theme of twentythirteen. It works fine in localhost without any error but when I put live on the server I got the following error
Warning: call_user_func_array() expects parameter 1 to be a valid
callback, function 'parent_theme_locations' not found or invalid
function name in
/home/nonaitpub/public_html/subedi/wordpress/wp-includes/plugin.php on
line 496
I think you had called function 'parent_theme_locations' somewhere in your functions.php file.Like add_action('after_setup_theme','parent_theme_locations',20);
Related
I'm working on a simple imageboard based by TinyBoard (xampp), when I try to post with image, website gives me error for some reason:
Fatal error: Cannot redeclare imagecreatefrombmp() in C:\xampp\htdocs\inc\image.php on line 584
image.php:
[1]https://pastebin.com/xqj2NAuX
(584 line = 77 line)
PHP 7.2, any help?
ANSWER:
Just change the function name to something else on line 1:
function imagecreatefrombmp2($filename)
(from user3647971)
Just change the function name to something else on line 1 :
function imagecreatefrombmp2($filename) {
the error warns you that a function named exactly like this has already been declared. It's a built-in php function: http://php.net/manual/en/function.imagecreatefrombmp.php
I have problem with my Symfony2 project. On the localhost it works fine, but on the server I got that error:
"Catchable Fatal Error: Argument 1 passed to
Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::initialize()
must be of the type array, string given, called in
/home/visset/ftp/cms/dashboard/app/cache/dev/classes.php on line 252
and defined"
I checked it and to initialize() function passed empty string.
What is the reason of that problem?
I am using CakePHP 2.X latest. Facing unique error.
This is error i am getting:
Warning (2): call_user_func_array() expects parameter 1 to be a valid
callback, first array member is not a valid class name or object
[CORE/Cake/Utility/ObjectCollection.php, line 132]
Warning (2): call_user_func_array() expects parameter 1 to be a valid
callback, first array member is not a valid class name or object
[CORE/Cake/Utility/ObjectCollection.php, line 132]
Fatal error: Call to a member function link() on a non-object in
/data/html/savaganza/app/View/Elements/header.ctp on line 21
I am simply using Html in my header element
Line 21: <?php echo $this->Html->link('Categories', array('controller'=>'categories') ); ?>
This Header element is calling from all views this is giving me error for some view, i don't know why but its working fine for some views.
Efforts:
When i change $this->Html to $this->html it works why???
When i tried var_dump($this->Html) it gives string(58)
"�H��.
Its working in my loacal server but not in live server.
Suggest me please.
May be this question link to Weird PHP error: 'Can't use function return value in write context'
Perfect Answer: Because empty is not a function but a language construct (not sure), and it only takes variable
but when i change this line:
$des = (!empty(html_entity_decode($c['Coupon']['description'])))?html_entity_decode($c['Coupon']['description']):'Not Avaliable';
to
$des = html_entity_decode($c['Coupon']['description']);
$des = (!empty($des)) ? $des : 'Not Avaliable';
It works i don't know exact reason. Hope somebody help me to understand this.
I am new to opencart, so please help me.
I am using opencart version 1.5.6, now whenever I edit and delete the product it shows me
Fatal error: Call to a member function productUpdateListen() on a non-object in /home/crazepur/public_html/admin/controller/catalog/product.php on line 78
and
Fatal error: Call to a member function deleteProduct() on a non-object in /home/crazepur/public_html/admin/controller/catalog/product.php on line 133 respectively.
Although it edit and delete the product.
Please help me how to fix it.
Code in Line 78 $this->openbay->productUpdateListen($this->request->get['product_id'], $this->request->post);
And code in line 133 $this->openbay->deleteProduct($product_id);
This means $this->openbay is not an object which contains function productUpdateListen() & deleteProduct(), probably it's NULL or false in some cases (nothing found) due to it's not accessible. Out of scope.
Try
var_dump($this->openbay);
Check the O/P
it's simple and the error-message says it all: your $this->openbay doesn't have those methods (productUpdateListen() and deleteProduct()) - most likely it isn't an object at all.
please debug your code since it's impossible to say what's going wrong wich so little information. to start, do a var_dump($this->openbay); right before the function-calls and check the output.
I'm in the middle of writing some code to possibly extend some modules in Magento, and while I was writing a class to extend the Mage_Adminhtml_Promo_QuoteController, I came across to an error when I testing my class's controller action by using the url: http://127.0.0.1/magenta_demo/index.php/pricebeat_admin/adminhtml_quote/generatecoupon. It's my localhost
The error outputted on the browser was:
Fatal error: Class 'Mage_Adminhtml_Promo_QuoteController' not found in /Applications/XAMPP/xamppfiles/htdocs/magenta_demo/app/code/local/Pricebeat/controllers/Adminhtml/QuoteController.php on line 3
However, when go to my IDE and click on the Mage_Adminhtml_Promo_QuoteController to go that class from the new class I created, it takes me there with no problem.
Here is the code.
class Pricebeat_Adminhtml_QuoteController extends Mage_Adminhtml_Promo_QuoteController
{
public function generateCouponAction(){
echo 'Hello world. This is just testing.';
exit;
}
}
Unless I am doing something wrong with the directly structure, Is there anything wrong with the code at the moment that keeps on giving me this message?
One more thing. I checked my system log and the message outputted was:
2012-10-06T12:00:31+00:00 ERR (3): Warning: include(Mage/Adminhtml/Promo/QuoteController.php) [function.include]: failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/magenta_demo/lib/Varien/Autoload.php on line 95
2012-10-06T12:00:31+00:00 ERR (3): Warning: include() [function.include]: Failed opening 'Mage/Adminhtml/Promo/QuoteController.php' for inclusion (include_path='/Applications/XAMPP/xamppfiles/htdocs/magenta_demo/app/code/local:/Applications/XAMPP/xamppfiles/htdocs/magenta_demo/app/code/community:/Applications/XAMPP/xamppfiles/htdocs/magenta_demo/app/code/core:/Applications/XAMPP/xamppfiles/htdocs/magenta_demo/lib:.:/Applications/XAMPP/xamppfiles/lib/php:/Applications/XAMPP/xamppfiles/lib/php/pear') in /Applications/XAMPP/xamppfiles/htdocs/magenta_demo/lib/Varien/Autoload.php on line 95
Any help would be greatly appreciated.
Thanks guys
Ok I found my problem. Here's the link to refer to the source. http://prattski.com/2010/06/24/magento-overriding-core-files-blocks-models-resources-controllers/
Jesus....
You have to explicitly include the file of the controller class you are overriding.