I include mod_jd_campaigns twice in an article, once in the intro text and once in the 'read more' text. When I click on the donate button in the 'read more' text I get the donation as I should. However, when I click on the donate button in the intro text I get an error with this error message:
Message: 'campaign_id' is null or not an object
Line: 457
Char: 4
Code: 0
URI:
christianjorgensen.be/Joomla1/index.php
My setup is this:
I have written an article for each campaign. For example for campaign 'aboubakar' with campaign id 1 I have in the intro text to the article placed a {loadposition aboubakar}, and in the 'read more' text I have likewise placed a {loadposition aboubakar}. I have saved a copy of mod_jd_campaigns with the campaign-id selected in the parameters and position aboubakar.
I am a beginner, but I figured out that the donation form is called in the tmpl.default.php file of the module. I see the function donationForm(campaignId) and see that this function is called by the line:
<input type="button" class="button" onclick="donationForm(<?php echo $row->id ; ?>);" value="<?php echo JText::_('JD_DONATE'); ?>" />
As a test I print out the campaign id number out by including the code:
<tr><td><strong>Campaign id</strong></td>"
<td><?php echo $row->id ; ?></td></tr>
and the campaign id shows correctly both in the intro text and in the 'read more' text.
I shall be grateful for any help in resolving this, so that I get a workable donate button both in the intro text and in the read more text.