Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Quercus

Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2010, 09:30 PM
sblommers sblommers is offline
Member
 
Join Date: Nov 2009
Location: Almere, The Netherlands
Posts: 32
Unhappy Unable to UNSET values in Drupal 6.16 / Quercus 4.0.3

Hi there,

I have a fully working Drupal 6.16 site running next to a Java webapp (integrated with eachother using a module) but that is not the issue here.

We are using the Drupal CCK module and a CCK Date module.
From the Java webapp we are executing some php code (using Quercus offcourse) that should nullify some of those fields. And here is where it get's ugly.

I am able to set any value (if it is correct) but I cannot set empty strings or NULL values to any of the php-object fields.

When using Drupal 6 on Quercus (running on Jetty6) I execute the following code:

Code:
<?php 
include_once "./includes/bootstrap.inc";
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

$original = node_load(1979);
$original->status = 1;

$original->field_date_fasttrack[0]['value'] = "2010-01-01T00:00:00"; // THIS WORKS
$original->field_date_fasttrack[0]['value'] = "0000-00-00T:00:00:00"; // THIS DOES NOT WORK but it is incorrect date so that's obvious
$original->field_date_fasttrack[0]['value'] = ""; // THIS DOES NOT WORK
$original->field_date_fasttrack[0]['value'] = NULL; // THIS DOES NOT WORK

$original->field_module[0]['value'] = "1111"; // THIS WORKS
$original->field_module[0]['value'] = ""; // THIS DOES NOT WORK
$original->field_module[0]['value'] = NULL; // THIS DOES NOT WORK
$original->field_module[0] = NULL; // THIS DOES NOT WORK

node_validate($original);
$node = node_submit($original);
node_save($node);
cache_clear_all();
I was wondering if any of you have run into the same issue with (perhaps) other projects or drupal in specific and could help me out, .. I'm pretty stuck.

Best regards and thank you for reading my message,

Sebastiaan
Reply With Quote
  #2  
Old 04-08-2010, 09:30 AM
sblommers sblommers is offline
Member
 
Join Date: Nov 2009
Location: Almere, The Netherlands
Posts: 32
Thumbs up New tests

I'm using the latest SNAPSHOT now and still have the same issue.
Drupal saves body / title fields and those are able to set to NULL but values in an array (for example CCK) don't work.

To summarize (green lines work, red lines don't):

Code:
<?php include_once "./includes/bootstrap.inc";
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

	$original = node_load(1980);
	$original->status = 1;
	
        $original->body = NULL;
	$original->title = NULL;
	$original->field_originator_name[0]["value"] = NULL;
	$original->field_originator_name[0]["value"] = "";
	$original->field_originator_name[0]["value"] = "My Dog's name is";

	if($error = node_validate($original) == NULL) {
		$node = node_submit($original);
		node_save($original);
	} else echo "ERROR: " + $error;
	cache_clear_all();

Last edited by sblommers; 04-08-2010 at 09:32 AM. Reason: Layout
Reply With Quote
  #3  
Old 04-08-2010, 01:07 PM
sblommers sblommers is offline
Member
 
Join Date: Nov 2009
Location: Almere, The Netherlands
Posts: 32
Default No workaround

I've tried everything to work around this issue and they all fail.

Does someone have the same problem? Are the people at Caucho able to help me?

Thanks in advance.

Sebastiaan
Reply With Quote
  #4  
Old 04-09-2010, 01:04 AM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

I've reported a bug at:

http://bugs.caucho.com/view.php?id=3989

And can you do a var_dump() of the following variables?

<?php

var_dump($original);
var_dump($original->field_module[0]);

?>
Reply With Quote
  #5  
Old 05-10-2010, 03:49 PM
sblommers sblommers is offline
Member
 
Join Date: Nov 2009
Location: Almere, The Netherlands
Posts: 32
Smile

Hi nam,

I worked around this problem by creating a QuercusModule that sets NullValue.create() for now.

Keep up the good work.

Best regards,
Sebastiaan
Reply With Quote
  #6  
Old 05-26-2010, 08:38 AM
ranscie69 ranscie69 is offline
Junior Member
 
Join Date: May 2010
Posts: 2
Thumbs up Thank you for your post!

YSL Shoes really give total freedom to your toes.Sounds so surprising!Fashion couldn’t go without Christian Louboutin Shoes and Vibram Five Fingers,which highly promote women's chic personality and sexy,elegant glamor.If we say ED Hardy Shoes gives the whole romantic fantacy to girls zumba dvd.
Reply With Quote
Reply

Tags
drupal, quercus

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:46 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.