By seandoyle on
Hi -
I'm new at this.
Drupal 6.12; PHP 5.2.9-2; IIS/7.0; JQuery Update 1.2.6; Devel 6.x-1.16; Views 6.x-2.6.
I've installed views_datasource from http://drupal.org/node/307223#comment-1040887 - the initial installation didn't display any "JSON data document" style settings when creating a view and this zip file fixed that issue.
There's not much else installed here -I assumed that there was some module conflict and started again from scratch.
I've created a view of comments with the Style 'JSON data document' and Row Style 'Unformatted'. The output looks like this:
"nodes": [
{
"<span id=thmr_2 class=thmr_call>n cid" : "1",
"comments_comment" : "If this were a real comment..",
"comments_format" : "1",
"comments_timestamp" : "1245332885\n<\/span>",
},
]<script type="text/javascript">jQuery.extend(Drupal.settings, { "thmr_2": { "name": "views-view-row-unformatted.tpl.php", "type": "tpl", "duration": 1.51, "used": "sites/all/modules/views_datasource/views-view-row-unformatted.tpl.php", "candidates": [ "views-view-row-unformatted.tpl.php" ], "preprocessors": [ "template_preprocess", "template_preprocess_views_view_row_unformatted" ] }, "request_id": "18634a3b92735d89e", "devel_themer_uri": "/drupal/devel_themer/variables/18634a3b92735d89e" });</script>
There are two problems: the <span> and the trailing <script>. Where are these coming from and how do I turn them off?
Thanks.
Sean
Comments
It's the devel module
If I disable the devel module the bad markup disappears.
Is there anything less drastic to do?
In views-views-json.tpl.php the line
tag. Is there a way to not invoke the hooks for the devel module so I can leave this on for other sections of my code? Thanks.module_invoke_all('exit');
was creating the
Theme Developer
It's not the devel module; it's the theme developer.
Not sure if it's a problem with the views datasource or the theme developer.
theme developer is very
theme developer is very useful, but has some incompatibilities. Enable only when required, otherwise leave it off.