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

Recent Comments
#1

Hi,
I am using Commentics included in my pages.

When I use the 'Recent Comments' add-on on just 1 page, it works fine.

When I include it in more than 1 page, I'm getting an error as :

Code:
Notice: Constant IN_COMMENTICS already defined in /home/domain/domains/mydomain.com/public_html/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 1

This is a directory/file of my cms.

Is there a way to prevent this error?

Thanks
JohN
Reply
#2

Hi,

Try changing this:

PHP Code:
<?php 
define
('IN_COMMENTICS', 'true');

to:

PHP Code:
<?php 
if (!defined('IN_COMMENTICS')) { define('IN_COMMENTICS', 'true'); }

Have you completed the interview?
Reply
#3

(17-Jun-2013, 02:24 PM)Steven Wrote:  Hi,

Try changing this:

PHP Code:
<?php 
define
('IN_COMMENTICS', 'true');

to:

PHP Code:
<?php 
if (!defined('IN_COMMENTICS')) { define('IN_COMMENTICS', 'true'); }

Hi,
Thanks for the speed reply!

This generates an other error:

Code:
Notice: Undefined variable: cmtx_mysql_table_prefix in /home/domain/domains/mydomain.com/public_html/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 8
Reply
#4

I'm not getting the logic of these errors.

What is tried is:

I've placed the code for the Recent Comments as a test in a separate php file.
Removed the add-om from the home page and placed it only on an other page. The page is not a sub page but root as well. I've include the test page with [include 'core/com/nl/comments/test.php';]

The errors come up:

Code:
Notice: Constant IN_COMMENTICS already defined in /public_html/core/com/nl/comments/test.php on line 2


Notice: Undefined variable: cmtx_mysql_table_prefix in public_html/core/com/nl/comments/test.php on line 9

If I place [include 'core/com/nl/comments/test.php';] on the home page, it works fine.

I am aware that it seems to be a problem of my cms but as the add-on works fine on the home page, I have hope that it could be solved.
Reply
#5

Did you change line 3 accordingly:

PHP Code:
<?php 
require_once "comments/includes/db/connect.php";

Have you completed the interview?
Reply
#6

Another thing I've thought of.. if you're calling the connect.php file above from inside a function it might be that you need to globalise the $cmtx_mysql_table_prefix variable first. Try adding this at the beginning of your page:

PHP Code:
<?php 
global $cmtx_mysql_table_prefix;

Have you completed the interview?
Reply
#7

I have tried the
Code:
global $cmtx_mysql_table_prefix;
option, with no result.

I have noticed that I get a bunch of 'Notices' but the data is displayed correctly in between. All new entries are shown as in:

Code:
Notice: Constant IN_COMMENTICS already defined in /public_html/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 1

Notice: Undefined variable: cmtx_mysql_table_prefix in /public_html/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 4

Name: ........
From: ....
At: .....

Remains very strange that all works nice on the home page but the module refuses to do it's job at every other page. (even as a copy of the home page)

So I thought that turning all php error messaging of, would do the trick.

Code:
error_reporting(0);

But that did not keep the notices away.

Though shutting off the error reports should not be the way to go, I'd appreciate it if you have a working option to keep the messages away.

Thanks
Reply
#8

Is this add-on still available? I cannot find any references to add-ons on the site.
Reply
#9

Hi Peter, yes it's now known as 'Extractor' and it's available in the Client Area if you have a licence.
https://commentics.com/clients

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by noblues
26-Sep-2013, 05:44 PM
Last Post by kooler
02-Aug-2013, 05:29 PM
Last Post by Steven
27-Jan-2013, 09:31 PM
Last Post by brande
23-Jan-2013, 07:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)