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
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.

See:
http://alittlebirdy.com/upcoming/newest/Environmental

#1

philbar - November 29, 2008 - 02:46

I changed the theme to 4plus and the problem persists.

#2

philbar - November 29, 2008 - 04:21

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

Brigadier - December 5, 2008 - 15:54

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

philbar - December 7, 2008 - 04:36

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

philbar - December 28, 2008 - 05:27
Title:Scoops Not Displayed Properly in New D6 Installation» Unnecessary Dependency of Embedded Objects Module
Component:Code» User interface
Priority:normal» minor

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

philbar - December 28, 2008 - 05:28
Title:Unnecessary Dependency of Embedded Objects Module» Unnecessary Dependency for Embedded Objects Module in Default Theme

#7

philbar - June 5, 2009 - 04:56
Assigned to:Anonymous» philbar

#8

mercmobily - June 5, 2009 - 05:54

Hi,

Philbar, this is very easy to fix, just change:

<?php $embedded_stuff=drigg_embed_contents($node,$node_url,$teaser); ?>

Into:

<?php
if( 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

mercmobily - June 5, 2009 - 10:11
Title:Unnecessary Dependency for Embedded Objects Module in Default Theme» Unnecessary Dependency for Embedded Objects Module and Extra Voting Forms in Default Theme

#10

philbar - June 5, 2009 - 20:38
Title:Unnecessary Dependency for Embedded Objects Module and Extra Voting Forms in Default Theme» Unnecessary Dependency for Embedded Objects Module
Priority:minor» normal
Status:active» fixed

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

mercmobily - June 6, 2009 - 02:01

Hi,

OK I agree completely.

Merc.

#12

mercmobily - June 18, 2009 - 07:40
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.