When uploading a file with the core upload module, the error An Http error 0 occured occurs. Browsing to upload/js returns:

{ "status": true, "data": "\x3cdiv class=\"messages error\"\x3e\nValidation error, please try again. If this error persists, please contact the site administrator.\x3c/div\x3e\n" }
      xmlns:dc="http://purl.org/dc/elements/1.1/"
      xmlns:foaf="http://xmlns.com/foaf/0.1/"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

which shows here the RDFa markup being added to the json response.

Turning off the setting Output an XHTML+RDFa DOCTYPE solves the problem.

CommentFileSizeAuthor
#15 476280.patch561 bytesvkareh
#14 476280.patch476 bytesvkareh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

Title: RDFa settings breaks the upload module » RDFa setting breaks json output of some modules
digi24’s picture

I can confirm the problem.

Maybe it would be better to only use a replace strategy in _rdf_ob_handler() than the current remove and insert approach?

mikeytown2’s picture

this might be related but this doesn't work

test.php

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
echo "Test";
exit;

Test is not outputted.

mikeytown2’s picture

above error happens when "Output an XHTML+RDFa DOCTYPE: " is enabled.

SocialNicheGuru’s picture

This is also breaking the installation of Open Atrium. I am not sure it is for the same reason but it might.

lelizondo’s picture

The issue #434394: 'HTTP error 0 occurred' on image upload might be related to this since fieldfield breaks when RDFa is enabled.

Anonymous’s picture

Title: RDFa setting breaks json output of some modules » RDFa setting breaks json output of some modules and ahah functionality of cck buttons

Enabling RDFa is also breaking the AHAH functionality of CCK's 'add more items' button for me, at least with the modules that I have enabled.

I have added this to the title of the issue so people may find it more easily.

plasticlax’s picture

where is this setting?
Turning off the setting Output an XHTML+RDFa DOCTYPE solves the problem.

scor’s picture

browse to admin/settings/rdf (Administer › Site configuration > RDF settings) and open the RDFa fieldset.

SocialNicheGuru’s picture

When I enable rdf, I get WSOD

Fatal error: Call to undefined function ctools_include() in /sites/all/modules/contrib/purl/purl.module on line 631

Anonymous’s picture

SocialNicheGuru, that is probably a different issue than the one here. This one is specifically related to javascript functionality and the Output RDFa setting of RDF module.

lelizondo’s picture

@SocialNicheGuro you probably updated to the latest version of Purl and didn't read the instructions, Purl is now dependent from Ctools, and you probably don't have it installed. As @linclark said, that's a different issue than the one here.

SocialNicheGuru’s picture

no, i have ctools installed and it works fine. It only gives me WSOD when I install RDF.

edit- i get no WSOD with an upgrade

vkareh’s picture

Status: Active » Needs review
FileSize
476 bytes

I am using RDFa with FileField and was having the same problem. I created a small patch that should fix it for the FileField and the Add another item buttons.

After applying the patch, try enabling the Output an XHTML+RDFa DOCTYPE.

vkareh’s picture

FileSize
561 bytes

I added an extra argument condition arg(1) != 'js', for the core upload.module, which has a menu callback for upload/js.

geerlingguy’s picture

Simply confirming this bug – I get an error on CCK 'Add another item' button (among other things) after enabling RDFa.

jyg’s picture

Also confirming Filefield + RDF issue. With diff version of jQuery it fails differently, but still fails. Broken JSON data seems to be the problem

vkareh’s picture

Does it fail with the patch in #15?

jkoprax’s picture

@vkareh: tnx for the patch!

solved the problem and saved my day :)

joeredhat-at-yahoo.com’s picture

Issue tags: +RDF, +RDFa, +HTTP error 0

The patch in comment 15 definitely fixes the problem, and makes perfect sense -- there's no need to use output buffering to add the RDFa headers on a javascript request. (For the record, this is *one* of the many causes of the infamous HTTP error 0!)

Any reason this patch can't be incorporated into RDF?

smustgrave’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)