When i try to add any actions on my nodes (new or old nodes), i recieve this error:

"Uma requisição HTTP AJAX terminou de forma anormal.
Estas são as informações de depuração.
Caminho: !url
Texto de Status: n/a
Texto de Resposta:
Fatal error: Call to undefined method DateObject::getTimestamp() in /var/www/sites/all/modules/scheduled_actions/scheduled_actions_node/scheduled_actions_node.module on line 629
ReadyState: undefined"

Comments

slashrsm’s picture

Sorry for a late reply... I was around for last 10 days.

It looks like this is a Date issue. I tried latest -dev of Date 7.x-2.x. Can you try if this fixes your problem?

slashrsm’s picture

Status: Active » Postponed (maintainer needs more info)

Have you tried with Date 7.x-2.?

mhawker’s picture

Version: 7.x-1.1 » 7.x-1.x-dev

I receive the same error when trying to add an action to my node. I uninstalled both the Date and Scheduled Actions modules, and reinstalled the dev versions (scheduled_actions-7.x-1.x-dev, date-7.x-2.x-dev), but still get the error.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /system/ajax
StatusText: parsererror
ResponseText:
Fatal error: Call to undefined method DateObject::getTimestamp() in /home/acsmtg/public_html/engage/sites/all/modules/scheduled_actions/scheduled_actions_node/scheduled_actions_node.module on line 629

slashrsm’s picture

I tried it with Date 7.x-1.x and 7.x-2.x today and it works fine with both. I had some problems, when I was using date format without time, but the error was totally different.

Can you post screenshot of page when this error happens?

mhawker’s picture

StatusFileSize
new748.01 KB

Screenshot attached. Thanks for looking at this.

slashrsm’s picture

Hm... that's wierd. I'm unable to reproduce this, but I remember seeing this error once in the past. Can you double check that you use latest Date?

mhawker’s picture

StatusFileSize
new203.88 KB

Date 7.x-2.x-dev
Scheduled Actions 7.x-1.x-dev

I think I started out using both recommended version first, but received the same error.

slashrsm’s picture

Hm... can you post your DB and files somewhere, so I can work on same environment as you do?

mhawker’s picture

StatusFileSize
new1.51 KB

I can give you a module and theme list fairly quickly, would that work?

slashrsm’s picture

Let's try :)

mhawker’s picture

Can no longer reproduce.

I can't give any indication as to what changed, but I no longer get this error. I believe the dev Date module has had a couple of updates since I originally posted, possibly that fixed it.

slashrsm’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Great. Ping me if problem appears again.

luisasasi’s picture

StatusFileSize
new125.28 KB

I verify the same problem in two different sites.
I put the image of the errors and modules that are in use on the sites.
I've tried with
7. x-August 23, 2011 + 2.0-alpha4 7. x-1.1 July 23, 2011
7. x-August 23, 2011 + 2.0-alpha4 7. x-1.1 July 23, 2011
7. x-2-dev +7 November 24, 2011. x-1-dev September 18, 2011
7. x-2-dev +7. November 24, 2011 + x-1-dev September 18, 2011
Drupal 7.9
On a site I put only these modules
Date
Date Api
Date Popup
Date views
Chaos tool suite
CKEditor
IMCE
Localization update
VIEWS

luisasasi’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

I verify the same problem in two different sites.
I've tried with
7. x-August 23, 2011 + 2.0-alpha4 7. x-1.1 July 23, 2011
7. x-August 23, 2011 + 2.0-alpha4 7. x-1.1 July 23, 2011
7. x-2-dev +7 November 24, 2011. x-1-dev September 18, 2011
7. x-2-dev +7. November 24, 2011 + x-1-dev September 18, 2011
Drupal 7.9
On a site I put only these modules
Date
Date Api
Date Popup
Date views
Chaos tool suite
CKEditor
IMCE
Localization update
VIEWS

slashrsm’s picture

I tried with Date 7.x-2.x-dev and 7.x-2.0-alpha4 and I was unfortunatley unable to reproduce.

Can you tell me which time format do you use for Scheduled action and how it looks like?

luisasasi’s picture

Scrivo in Italiano perchè nel suo profilo ho letto che lei parla italiano.
Il mio inglese non è buono.
Se mi segnala un indirizzo e-mail posso darle Login e Password per entrare come administrator nel sito, così può vedere.
E' un sito di prova e non ci sono problemi.
Con IE 8 e FireFox ci sono molti problemi.

slashrsm’s picture

No problem. Send me login and pass via my contact form (http://drupal.org/user/744628/contact).

pixel8r’s picture

Hi!

I was having the same issue. Found a quick fix, maybe not the prettiest, but it got the module working:

replace this on line 651 of schedule_actions_node.module

      if ($date->getTimestamp() < REQUEST_TIME) {

with this:

      if (strtotime(implode(" ", $element['#value'])) < REQUEST_TIME) {

also replaced all of the "clicked_button" with "triggering_element"

like i said, this was a quick fix as the module would throw Fatal Error with WSOD on getTimestamp. Hope this saves someone a few hours :)

**NOTE** - this was done on the dev version.

slashrsm’s picture

Status: Active » Needs review
StatusFileSize
new1.6 KB

That seems OK solution. If it fixes this problem we can commit it. Patch is attached. Can someone else review it?

stangslvr’s picture

I ran into this same problem but the fix in #18 got rid of the wsod and allowed the values to be set on the form. I couldn't find the problem until I was testing by adding nodes from the "admin/config/system/actions/scheduled_actions_node/list" menu. For whatever reason the form on the node itself just wouldn't add the values, but didn't show the wsod or error messages. All resolved with this simple solution. Thanks for the great module.

slashrsm’s picture

RTBC?

slashrsm’s picture

Status: Needs review » Fixed

commited

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.