Unnecessary Dependency for Embedded Objects Module
philbar - November 27, 2008 - 18:45
| Project: | Drigg |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | philbar |
| Status: | closed |
Jump to:
Description
I freshly installed drupal 6 and drigg. Everything appeared to be working fine until I created a scoop. Now when it is displayed (either list form or the node), all that is displayed is the following code (when viewing source):
<div class="node ntype-drigg odd clearfix" id="node-1">
<div class="extra_voting_forms karma_3_big">
<form action="/extra_voting_forms/handle" method="post" class="karma_form" id="x1">
<div>
<span class="karma_score">1</span>
<span class="karma_buttons">
<label class="karma_up_clicked_clickable" for="u1">
<input id="u1" type="radio" name="karma_vote" value="1" checked="checked"/>
<span>Up</span>
</label>
<label class="karma_down_not_clicked_clickable" for="d1">
<input id="d1" type="radio" name="karma_vote" value="-1"/>
<span>Down</span>
</label>
<input type="hidden" name="oid" value="1"/>
<input type="hidden" name="otype" value="n"/>
<input type="hidden" name="form_style" value="3"/>
<input type="hidden" name="form_type" value="form"/>
<input type="submit" name="submit" value="Vote" />
</span>
</div>
</form></div> I can still access the admin section and any page that doesn't have any scoops, just not pages that display the scoop I created. This could be a problem with the Extra Voting Form, but I wasn't sure so I created the bug for drigg.

#1
I changed the theme to 4plus and the problem persists.
#2
Enabling the "Drigg Embedded objects" module, solves the problem. This leads me to believe there is something in the theme that requires "Drigg Embedded objects" to function.
Also, I disabled the URL Form from submitting scoops.
#3
One dependency I found on the "Drigg Embedded objects" module is a call to drigg_embed_contents() in the default Drigg theme at line 3 of node-drigg.tpl.php. That might be the only one - deleting that line made my site display properly. After that though I put the line back and just enabled the "Drigg Embedded objects" module (at least for the time being).
#4
You are correct. Removing line 3 of node-drigg.tpl.php fixed the problem I was having. The code I removed is as follows:
<?php $embedded_stuff=drigg_embed_contents($node,$node_url,$teaser); ?>#5
I'm updating the ticket to reflect the issue better and to lower the priority since the default theme isn't a major concern at this point.
#6
#7
#8
Hi,
Philbar, this is very easy to fix, just change:
<?php $embedded_stuff=drigg_embed_contents($node,$node_url,$teaser); ?>Into:
<?phpif( module_exists(drigg_embed) ){
$embedded_stuff=drigg_embed_contents($node,$node_url,$teaser);
}
?>
And things should work.
THe same should apply to:
<?php print extra_voting_forms_show_form($node,'n',3); ?>With the difference that here you should check if extra_voting_forms exists.
This should also fix the other bug of dependency to extra_voting_forms.
Philbar, if you had CVS access I'd get you to test this and commit. Till then, please send me a patch with the fix once you've tested that it works, so that we can close these 2 issues...
Merc.
#9
#10
Commit #221386 by philbar at 20:33
Keeping Extra Voting Forms dependency issue separate. I want to make sure the dependency of EVF gets sufficient testing. I also want to investigate using another voting form (Vote Up/Down or Plus1) instead of EVF with Drigg. That is the only way to ensure Drigg isn't dependent on EVF.
#11
Hi,
OK I agree completely.
Merc.
#12