[solved] Warning: constant(): Couldn't find constant AUP_INVITESUCCES

More
6 years 3 months ago - 6 years 3 months ago #40660 by baltazors
Hello! In the profile of Community Builder I saw next error!
Code:
Warning: constant(): Couldn't find constant AUP_INVITESUCCES in /var/www/.../components/com_comprofiler/plugin/user/plug_cbaltauserpoints/altauserpoints.php on line 253

This error applies only tab AUP Activities, if disable this tab, the error disappears! I understand the error occurs in this part of the code:
Code:
if(strpos( $activity->rule_name ,'AUP_')!==false) $rule_name = constant($activity->rule_name); else $rule_name = $activity->rule_name;

Help please to fix the bug!

Joomla! 3.8.3 Stable
PHP 7.1.11
Attachments:
Last edit: 6 years 3 months ago by nordmograph.

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #40663 by nordmograph
Hello!
This sounds more like a missing language constant in the language file.
Did you translate the english file ?

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago - 6 years 3 months ago #40664 by baltazors
Hello! In the path /components/com_comprofiler/plugin/user/plug_cbaltauserpoints/lang/ i put russian.php with the translation, then I commented out 3 lines (alphauserpoints.php)
commented: //include_once($CBAUPlanguagePath.'/lang/english.php');
added: include_once($CBAUPlanguagePath.'/lang/russian.php');

Plugin, of course I need with the translation!
Last edit: 6 years 3 months ago by baltazors.

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #40665 by baltazors
I uncommented the path to the file english.php and commented russian.php, the result is the same Warning: constant(): Couldn't find constant AUP_INVITESUCCES

Here is english lng:

Warning: Spoiler!

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #40666 by nordmograph
Add
DEFINE( 'AUP_INVITESUCCES','Successfull Invitation');
To your language files.
I'll add it to the core.

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.
The following user(s) said Thank You: baltazors

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #40667 by baltazors
Thank you so much! That helped! :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.345 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.