Call to undefined method GetStream\\Stream\\Feed::followFeed() - php

I am using getstream in laravel project. When calling followUser method of StreamLaravelManager class, it does not find followFeed method inside the package. What may be the problem here?
\FeedManager::followUser($follower->follow_id, $follower->user_id);
Above line of code is triggering the method.

I donot know what might be wrong here, but changing the get stream version solved this issue. Changed "get-stream/stream-laravel": "^2.2" to "get-stream/stream-laravel": "~2.2.6" in my composer and it solved . the issue.

Related

How to correct and change a static method to a non-static method for Joomla module

I updated a client's Joomla from J2.5.28 to J3.6.4. I have corrected most of the errors but this one stumps me even after researching here. I'm a novice PHP programmer and know enough to fix a few things here and there. I researched this throughout the internet and on StackOverflow and simply do not understand how to fix the following error in my particular case. I understand I could just turn off error reporting; However I do not want to do that because [from what I did find] this doesn't actually solve the problem. Solving the problem and correcting the code is what is actually recommended.
Here is the error:
Strict Standards: Non-static method modBtContentShowcaseHelper::fetchHead() should not be called statically in ...modules/mod_bt_contentshowcase/mod_bt_contentshowcase.php on line 64
Line 64 reads as follows:
modBtContentShowcaseHelper::fetchHead( $params );
I would like to know how to correct this.
Note: Upgrading this extension is not an option because it was customized by the developer of the extension and an upgrade would wipe everything out. Contacting them usually takes several days to get a response and I need to get this corrected
Thanks in advance for the help!
You need to initiate the class modBtContentShowcaseHelper
$x = new modBtContentShowcaseHelper();
$x->fetchhead($params);

The Bug Genie 'undefined function make_url()'

PHP Fatal error: Call to undefined function thebuggenie\core\helpers\make_url() in ../core/helpers/TextParser.php on line 706
This is the error that I keep getting when trying to set up the VCS-integration successfully in The Bug Genie. It is an issue tracker that has VCS (git) integration. The commits can be linked to a project, and with the correct commit-message to the right issue using a git-hook. Then you can view the commit in the issue tracker. Apparently the commit is getting linked to the project, but it doesn't get linked to the issue because of the error. Can anybody help me?
The source code on GitHub.
Thanks in advance!
I've found the solution. There appears to be an error in the vcs-integration. Apparently the ui.inc.php-library is not loaded when using the git-hook.
So the temporary solution (until they solve it) is:
At modules/vcs_integration/Vcs_integration.php:226, add:
framework\Context::loadLibrary('ui');
As far as i see, make_url function is defined in a global namespace, but is called from namespace thebuggenie\core\helpers. So i suppose that's your problem

Console calls (like cache clears or behat) throw an exception but all is fine in browser

I am creating a Symfony2 application, all works well, but when i try to execute my behat tests or clear the cache, i got this error:
Error: Call to undefined method
Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator::isFresh() in
[...]/vendor/symfony/assetic-
bundle/Symfony/Bundle/AsseticBundle/Factory/Resource/FileResource.php line 49
TemplateLocator does not even implements LoaderInterface, as required in FileResource construct.
Anyone has a clue ?
I figured out where the problem came from, but without understanding it.
It appeared that somewhere in my application I called
$this->container->get('twig')->render("Bundle:View:action.html.twig")
I changed to
$this->container->get('templating')->render("Bundle:View:action.html.twig")
twig service is a Twig_Environment instance, and template is a DelegatingEngine instance, both allowing to render a template.
And all works great again.
If someone could explain me what happened, I'll appreciate :)

Fatal error with Custom Magento Module on one server but not the other

I am creating my own custom module in Magento and during testing on a Litespeed server (PHP v5.2.14) I am getting a Fatal Error: Call to a member function batch() on a non-object in ../../../BatchController.php on line 25 that was not appearing during testing on another linux server and a wamp server (PHP v5.2.11).
This one has stumped me. I am guessing it has something to do with the server configuration rather than the code itself. But i am just guessing. I was hoping someone here could tell me.
The only real major difference I could see, aside from the php versions and environment, is that the server that the error is on is using the Suhosin Patch. But would that be something that could cause this?
The line in question is Mage::getModel('mymodule/mymodel')->batch(); which is enclosed in an IF statement. batch() is a public function located in my model file.
If you need more code let me know.
Thanks!
If you get a "non-object" error when calling a model, there's a problem with Magento's attempt to get your model class, and it is returning null. The reasons for this are not always apparent. If this worked identically on a normal LAMP stack, then the problem is most likely not in your code.
My first guess would be that the file does not have the proper permissions. Otherwise, it may have to do with resolving the classname. You could test this temporarily by calling the plugin directly like this:
$obj = new Mynamespace_Mymodule_Model_Mymodel();
$obj->batch();
If this works, then the file is readable, and you will want to go spelunking in the resolution of that classname. If it doesn't work, you have a problem with either autoloading or the declaration of your class.
Hope that helps!
Thanks,
Joe
Break it down.
You've tried to call
Mage::getModel('mymodule/mymodel')->batch();
and PHP told you it tried to call the method batch on a non-object. That means
Mage::getModel('mymodule/mymodel')
isn't returning a Model object the way it's supposed to.
First thing to do is clear out your Magento cache on the server you're having problems with. If your Module's config hasn't been loaded into the global config tree Magento will try to instantiate a Mage_Core_Model_Mymodel, and fail.
Second step is to make sure your module's app/etc/module file is in place.
Third step is to add some debugging (assuming a 1.4 branch) to the method that instantiates your objects and determine why Magento can't create your object
File: app/code/core/Mage/Core/Model/Config.php
...
public function getModelInstance($modelClass='', $constructArguments=array())
{
$className = $this->getModelClassName($modelClass);
if (class_exists($className)) {
Varien_Profiler::start('CORE::create_object_of::'.$className);
$obj = new $className($constructArguments);
Varien_Profiler::stop('CORE::create_object_of::'.$className);
return $obj;
} else {
#throw Mage::exception('Mage_Core', Mage::helper('core')->__('Model class does not exist: %s.', $modelClass));
return false;
}
}
...

Zend AMF throwing InvocationTargetException

I am trying to make a service call to a php function from flex, through Zend AMF. Most of the functions get called fine, but for one particular function, it throws the following exception:
InvocationTargetException:There was an
error while invoking the operation.
Check your operation inputs or server
code and try invoking the operation
again.
Reason: Fatal error: Call to a member
function getInvokeArguments() on a
non-object in
D:\wamp\www\ZendFramework\library\Zend\Amf\Server.php
on line 328
I am not able to debug through this - has anyone faced any issue like this before, or have any ideas how this can be debugged?
At a quick glance through ZFW's source, this appears to be a bug on their framework.
// There is no check if $this->_table[$qualifiedName] is an object, implements an interface, extends a class, only if it's set (the key exists).
$info = $this->_table[$qualifiedName];
$argv = $info->getInvokeArguments(); // Here's when you get the error.
Source: http://framework.zend.com/code/filedetails.php?repname=Zend+Framework&path=/trunk/library/Zend/Amf/Server.php
I looked in their bug tracker and haven't found anything related to this, perhaps you should open a new issue?
Additionally, you can debug the problem by grabbing the message that Flex is sending to the PHP client and making a test case out of it.
We finally realized that this was a problem in the flex project setup - don't know exactly what it was, but once we deleted and created the project again, things started working fine!

Categories