Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Bug-reports    Topic: Not able to submit
Pages: [1]   Go Down
  Print  
Author Topic: Not able to submit  (Read 4929 times)
0 Members and 2 Guests are viewing this topic.
peter
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 4


« on: October 31, 2009, 05:14:28 »

Just installed JComment tonight, it looks like a great component.

My "small" bug is that no comments can be posted.   Huh

Site: www.noerkjaer.com  (Direct link to a comment form: http://www.noerkjaer.com/index.php?option=com_content&view=article&id=511:outbreak&catid=34:frederik&Itemid=61 )

When I click "Submit" the page just jumps to the top.

In another topic http://www.joomlatune.com/forum/index.php/topic,737.0.html I read that two lines with javascript should be included in the HEAD. They are not on my page. Should these be added automatic or do I have to add these manual to each template that I use?

EDIT: Thoses comments already shown on the page is imported from my former comment-component.

Best regards

Peter
Denmark
« Last Edit: October 31, 2009, 23:03:09 by peter » Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: October 31, 2009, 20:10:10 »

This is strange but your page has no links to javascript files used by JComments... Can you try switch to some default template and check if this problem template-related or no?
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
peter
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 4


« Reply #2 on: October 31, 2009, 22:33:04 »

Bingo!  Cheesy

At least you have located the problem for me.  Smiley

Now I'm just wondering why it loads flawless in rhuk_milkyway or ja_purity, but not in my template.

When looking at the <head> section of my template and the default templates (mentioned above) there is no big difference.

So I'm a bit unsure of where to look for a reason...
Other add-ons (such as Multithumb) loads fine in the <head>-section.
What determinates what should be included in the head-section? Looking in my files in the template folder I really don't see any significant difference.

Any explanation or guidance would highly appreciated.
 
Cheers

Peter
« Last Edit: October 31, 2009, 22:38:07 by peter » Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: October 31, 2009, 22:36:12 »

Check if your template contain code:

Code:
<jdoc:include type="head" />
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
peter
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 4


« Reply #4 on: October 31, 2009, 22:55:22 »

Thanks for helping out.

It does.
Here is the first section of my template

Code:
<?php
defined
'_JEXEC' ) or die( 'Restricted access' );
JPlugin::loadLanguage'tpl_SG1' );
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language?>" lang="<?php echo $this->language?>" >
<head>
<jdoc:include type="head" />

<link rel="stylesheet" href="templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<!--[if lte IE 6]>
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/ie7.css" type="text/css" />
<![endif]-->

<?php
$user 
=& JFactory::getUser();
if (
$user->get('guest') == 1) {
$headerstuff $this->getHeadData();
$headerstuff['scripts'] = array();
$this->setHeadData($headerstuff); }
?>

<!-- script for creating rounded corners -->
<script type="text/javascript" src="templates/<?php echo $this->template ?>/script/cb.js"></script>
</head>
<body class="body_bg">
« Last Edit: October 31, 2009, 23:00:39 by peter » Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #5 on: October 31, 2009, 22:58:52 »

This code strips out all JavaScripts:

Code: (php)
$headerstuff['scripts'] = array();

change code:

Code: (php)
<?php
$user 
=& JFactory::getUser();
if (
$user->get('guest') == 1) {
$headerstuff $this->getHeadData();
$headerstuff['scripts'] = array();
$this->setHeadData($headerstuff); }
?>

with

Code: (php)
<?php
$user 
=& JFactory::getUser();
if (
$user->get('guest') == 1) {
  
$headerstuff $this->getHeadData();
  
$scripts $headerstuff['scripts'];
  
$headerstuff['scripts'] = array();
  foreach(
$scripts as $url=>$type) {
    if (
strpos($url'js/mootools.js') === false && strpos($url'js/caption.js') === false) {
      
$headerstuff['scripts'][$url] = $type;
    }
  }
  
$this->setHeadData($headerstuff);
}
?>
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
peter
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 4


« Reply #6 on: October 31, 2009, 23:02:55 »

SOLVED!

Hurray!  Cheesy

Thanks a million for not only the solution but also for the fast and effectice support!
Wonderful!
I owe you a beer!  Wink
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #7 on: October 31, 2009, 23:14:11 »

I'll very appreciate if you vote for JComments and leave review about JComments on JED
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Bug-reports    Topic: Not able to submit
 
Jump to: