This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Comment form not visible
#1

Hi, 

I have installed and integrated commentics successfully on my sub-domain . from backend I can check everything fine! 
One problem is there , I added 
PHP Code:
<?php
$cmtx_identifier
= '1';
$cmtx_reference  = 'Page One';
$cmtx_folder     = '/upload/';
require(
$_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php');
?>

just before footer . While  adding this php code  everything became invisible below this line including footer.

Unfortunately comment form is not visible on my page , although Admin panel is showing comment from enable for that page. 

I have updated .htaccess file at the root of sub domain.  Page url : http://durgapur.stechvision.com/master-subpage.php
Reply
#2

Hi sanzuu,

Can you change it to the below? I've added an extra line which will display the path to the file that it's trying to load. Check that the displayed path to the file is correct.

PHP Code:
<?php
$cmtx_identifier
= '1';
$cmtx_reference  = 'Page One';
$cmtx_folder     = '/upload/';
var_dump($_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php');
require(
$_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php');
?>

Have you completed the interview?
Reply
#3

Hi Steven ! Thanks for the time.

I updated new code and now displaying some text given below instead of displaying comment form

string(82) "/home/stechsia/public_html/durgapur.stechvision.com/commentics//frontend/index.php"

And an error is visible (google Chrome -Console) : Uncaught undefined
Reply
#4

The text that it's displaying is a path to a file. Can you check using your FTP programme that the path is correct and that the file exists at that location? Only you can know because it's different from server to server. One thing I noticed is there is a double "//" in there. For the $cmtx_folder line you probably put '/commentics//' instead of '/commentics/'.

Also between the 'var_dump' line and the 'require' line, add this:

PHP Code:
<?php 
if (file_exists($_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php')) {
echo
'File exists';
} else {
echo
'File does not exist';
}

Have you completed the interview?
Reply
#5

Thanks for answering!

I put '/' before 'frontend/index.php' just like '/frontend/index.php' and I removed it. I added your php code for file exists confirmation and it is showing:

string(81) "/home/stechsia/public_html/durgapur.stechvision.com/commentics/frontend/index.php" File exists
Reply
#6

Okay so it looks like it's including the file correctly. The error must be due to something else. Have you tried this FAQ?

https://www.commentics.org/support/knowl...article=15

Have you completed the interview?
Reply
#7

Hi..

The error is :
Fatal error: Can't use function return value in write context in /home/stechsia/public_html/durgapur.stechvision.com/commentics/frontend/controller/main/comments.php on line 213

Please help!
Reply
#8

I see. I guess your PHP version is lower than 5.5?

Try opening that file and replacing this..

PHP Code:
<?php 
if (empty(trim($this->data['comments_position_' . $i]))) {

With this..

PHP Code:
<?php 
$trimmed
= trim($this->data['comments_position_' . $i]);

if (empty(
$trimmed)) {

Please let me know if you experience any other errors because I'd like to make sure Commentics is compatible with your PHP version.

Have you completed the interview?
Reply
#9

Oh!! my God.
Finally comment form is visible on my page . Thank you for your great support !!!

Above comment form this line is never hiding.
string(81) "/home/stechsia/public_html/durgapur.stechvision.com/commentics/frontend/index.php" File exists

So I did not  submit the form and I am very excited to submit ........

Can I undo above two step? 

You can check my php info here : http://durgapur.stechvision.com/phpinfo.php


Attached Files Thumbnail(s)
   
Reply
#10

Yes you can undo the changes to the integration code.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
25-Oct-2020, 03:20 PM
Last Post by Steven
07-Oct-2014, 07:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)