We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Cron error message (recent) [Solved] | Forum

Evelyne
Evelyne Apr 9 '13
Even though I haven't changed anything neither installed any plugin, for about 4 or 5 days now I've been getting this same error message from cron. 


Any idea how to fix it?

<br />

<b>Fatal error</b>:  Call to a member function hasDecorator() on a non-object in <b>/home/[...]/public_html/[...]/ow_core/theme_manager.php</b> on line <b>186</b><br />


This is line 186:

        if ( $this->currentTheme->hasDecorator($decoratorName) )


And this is the whole extract of that specific part of the code (about Decorator):


    /**

     * Returns decorator template path.

     *

     * @param string $decoratorName

     * @return string

     * @throws InvalidArgumentException

     */

    public function getDecorator( $decoratorName )

    {

        $decoratorName = trim(mb_strtolower($decoratorName));


        if ( !array_key_exists($decoratorName, $this->decorators) )

        {

            throw new InvalidArgumentException(" Can't find decorator `'.$decoratorName.'` !");

        }


        if ( $this->currentTheme->hasDecorator($decoratorName) )

        {

            return $this->currentTheme->getDecorator($decoratorName);

        }


//        if ( $this->defaultTheme->hasDecorator($decoratorName) )

//        {

//            return $this->defaultTheme->getDecorator($decoratorName);

//        }


        return $this->decorators[$decoratorName];

    }


The Forum post is edited by Alia Apr 10 '13
MarkieMark67
MarkieMark67 Apr 9 '13
What CRON command are you using, and Who is your provider?
Evelyne
Evelyne Apr 9 '13
curl -s http://www.[domain]/[installation folder]/ow_cron/run.php


provider: Hub


OBS: it's been working really fine for over a month. Then suddenly...

MarkieMark67
MarkieMark67 Apr 9 '13
Try this instead 


wget -q -O /dev/null http://www.yoursite.com/ow_cron/run.php

Evelyne
Evelyne Apr 9 '13
Quote from MarkieMark67 Try this instead 


wget -q -O /dev/null http://www.yoursite.com/ow_cron/run.php


Nope! That was the one that came with the installation. It won't work at all. I did contact their support back then and they said that the only one that will work is the curl one.


It WAS working VERY fine, thank you, until very recently. Now, out of the blue, it "complains" about that line.


MarkieMark67
MarkieMark67 Apr 9 '13
Try and see if u add the -q or -dump. I had the same error and it was that the CRON was setting a cookie timer, and it was running to many process on the server
MarkieMark67
MarkieMark67 Apr 9 '13
Try

curl --silent --compressed curl http://site.com/cron.php

Evelyne
Evelyne Apr 9 '13
Thanks Markie,


but...
I tried adding the -q : still the same error message...
I tried adding the -dump: still the same error message...


This is so frustrating!


At least, the website itself seems to be working fine. (for me, I don't know for regular users)


Also, I don't think there would be "too many processes" for it to run, as there are still very few members or activity going on...


Evelyne
Evelyne Apr 9 '13
Quote from MarkieMark67 --silent --compressed curl

won't the "silent" command just prevent it from sending me the error messages???


UPDATE: answering my own question: no, it won't... :(


I tried and I'm still getting the same error.

The Forum post is edited by Evelyne Apr 9 '13
MarkieMark67
MarkieMark67 Apr 9 '13
I wish the wget command would work. I'm kinda lost But i'll do some testing on my end.
MarkieMark67
MarkieMark67 Apr 9 '13
Maybe 

php -q /home/username/public_html/scripts/run.phplynx -dump -useragent /home/username/public_html/scripts/run.php

Evelyne
Evelyne Apr 9 '13
Quote from MarkieMark67 I wish the wget command would work. I'm kinda lost But i'll do some testing on my end.

Thanks Markie!
Evelyne
Evelyne Apr 9 '13
I don't think this is a cron problem. If it were, it would have appeared sooner. Or the error would have changed as we changed the settings. Instead, it keeps pointing to the very same line/error, and it's related to Decorator function. 
MarkieMark67
MarkieMark67 Apr 9 '13
Decorator function error for me was a cron problem. My cron kept too many  process in memory. Check on Cpanel My Process 

 

Evelyne
Evelyne Apr 9 '13
Quote from MarkieMark67 Another suggestion

lynx -dump http://domain.com/folder/run.php?dl=file ;
curl http://domain.com/folder/run.php?dl=file

The first option I knew it wouldn't work, because when I asked them to figure out which cron instruction would work, they had already told me that lynx wouldn't work. But I gave it a try, and this is what I got:


% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

 

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0


For the second option (
curl http://domain.com/folder/run.php?dl=file), I got this error (which, from previous experience, indicates cron is not working)

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

 

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0


I'm no way specialist in cron jobs, but I really think it's not a cron problem this time...

Evelyne
Evelyne Apr 9 '13
Quote from MarkieMark67 Decorator function error for me was a cron problem. My cron kept too many  process in memory. Check on Cpanel My Process 

 


Can't find "My Process" on my cpanel (some functions vary, depending on the host). I can find "
Resource Usage" and "Bandwidth" and, of course, error logs. :(
MarkieMark67
MarkieMark67 Apr 9 '13
With Hub it's hard to say. I have gave you examples. I'd talk with your hosting. This error for the last 5 people I have helped. Was caused by CRON. It could be something else but I have never see it.
Evelyne
Evelyne Apr 9 '13
Quote from MarkieMark67 With Hub it's hard to say. I have gave you examples. I'd talk with your hosting. This error for the last 5 people I have helped. Was caused by CRON. It could be something else but I have never see it.

I did. This is their reply:

That's an error that is something specific to the application and not generated by our systems. You should contact the developers of the application for assistance. If they or you can say How it's a cron job issue we might be able to help but since it's dealing with third party code it's somewhat outside of our scope. Crons are operating normally on our servers.


That is not an indication of the problem, please contact them again. This error message "function hasDecorator() on a non-object " indicates that the error is a problem with the code in some way, perhaps its not being called properly but we are not able to say how the code should properly be used. The developer needs to assist with this issue.

Alia Team
Alia Apr 10 '13
This bug was fixed in 1.5.1 version of Oxwall.

You will need to download the update pack 1.5.1>> find ow_cron/run.php file>> copy/paste it to the corresponding place on your server.

More info here: http://www.oxwall.org/forum/topic/7494

I am not sure why you started getting this issue now though. Do you use 1.5.1 version?
Pages: 1 2 »