- Posts: 16
- Thank you received: 2
Kunena 5.2 Beta 1 Released (24 Sep 2020)
The Kunena team is thrilled to announce the first public beta release of Kunena 5.2, a native Joomla extension for Joomla 3.9. This is a development release and should be only be used for testing; this version is not recommended for live websites at this stage.
The purpose of this release is to encourage testing by downloading, installing and identifying any problems or shortcomings that people may discover. K 5.2.0 B1 is stable and we are aware that people will discover defects. We encourage you to use the forum to report defects, as soon as they are discovered, so that the development team can work through the problems before the release of K 5.1 as a stable product. Reporting defects does not mean that the problems can or will be fixed. The Kunena team is looking forward to hearing your feedback on how well we have achieved our design goals.
Solved Blue Eagle is always subscribing users to topic
When I upgraded to Kunena 4.0.11 I noticed that users were automatically being subscribed to a topic when they replied. The configuration settings were unchanged in the upgrade (as it should) remaining as:
Yet the checkbox would show up checked when replying to a topic that the user was NOT subscribed to.
This to me generates an unnecessary volume of emails that I don't want.
I looked through the code and found the solution (I think, at least so far so good).
In the file
<input style="float: left; margin-right: 10px;" type="checkbox" name="subscribeMe" id="subscribeMe" value="1" <?php if ($this->subscriptionschecked == 1 && $this->me->canSubscribe != 0 || $this->subscriptionschecked == 0 && $this->me->canSubscribe == 1)
When it should read:
<input style="float: left; margin-right: 10px;" type="checkbox" name="subscribeMe" id="subscribeMe" value="1" <?php if ($this->subscriptionschecked == 1 && $this->me->canSubscribe != 0 || $this->subscriptionschecked == 1 && $this->me->canSubscribe == 1)
The issue being:
subscriptionschecked == 0
What this is saying is that if user is NOT subscribed and can subscribe, then check the box/subscribe them.
When it should be saying is that if user IS subscribed and can subscribe, then check the box/subscribe them.
If they are not subscribed the check box should be unchecked, allowing them to check it if they please, but by default should be unchecked.
So I've changed that 0 to a 1, and it seems to work fine. I don't know if there are other places where this should be changed as well.
Please let me know if there are any issues with this.
Thank you, hope this helps,
Database collation check: The collation of your table fields are correct
Joomla! SEF: Enabled | Joomla! SEF rewrite: Disabled | FTP layer: Disabled |
This message contains confidential informationhtaccess: Exists | PHP environment: Max execution time: 30 seconds | Max execution memory: 64M | Max file upload: 4M
Kunena menu details:Warning: Spoiler!
ID Name Menutype Link Path In trash 128 FORUM mainmenu view=home&defaultmenu=119 community/forum No 119 Forum kunenamenu view=home&defaultmenu=121 forum No 120 Index kunenamenu view=category&layout=list forum/index No 121 Recent Topics kunenamenu view=topics&mode=replies forum/recent No 122 New Topic kunenamenu view=topic&layout=create forum/newtopic No 123 No Replies kunenamenu view=topics&mode=noreplies forum/noreplies No 124 My Topics kunenamenu view=topics&layout=user&mode=default forum/mylatest No 125 Profile kunenamenu view=user forum/profile No 126 Help kunenamenu view=misc forum/help No 127 Search kunenamenu view=search forum/search No 221 Forum Index communitymenu view=home&defaultmenu=120 forum-index No 216 Recent Topics communitymenu view=home&defaultmenu=121 forumindex No
Joomla default template details : rt_clarion_responsive | author: RocketTheme, LLC | version: 1.8 | creationdate: October 8, 2014
Kunena default template details : Blue Eagle | author: Kunena Team | version: 4.0.11 | creationdate: 2016-06-05
Kunena version detailed: Kunena 4.0.11 | 2016-06-05 [ Barcelona ]
| Kunena detailed configuration:| Kunena integration settings:Warning: Spoiler!
Kunena config settings: board_offline 0 enablerss 0 threads_per_page 20 messages_per_page 6 messages_per_page_search 15 showhistory 1 historylimit 6 shownew 1 disemoticons 0 template blue_eagle showannouncement 1 avataroncat 1 catimagepath category_images/ showchildcaticon 1 rtewidth 450 rteheight 300 enableforumjump 1 reportmsg 1 username 1 askemail 0 showemail 0 showuserstats 1 showkarma 0 useredit 1 useredittime 0 useredittimegrace 600 editmarkup 1 allowsubscriptions 1 subscriptionschecked 0 allowfavorites 1 maxsubject 50 maxsig 300 regonly 1 pubwrite 0 floodprotection 0 mailmod 0 mailadmin 0 captcha 0 mailfull 1 allowavatarupload 1 allowavatargallery 0 avatarquality 65 avatarsize 2048 imageheight 1600 imagewidth 1600 imagesize 4000 filetypes zip,txt,doc,gz,tgz,pdf,xls,xlsx filesize 4000 showranking 1 rankimages 1 userlist_rows 30 userlist_online 1 userlist_avatar 1 userlist_posts 1 userlist_karma 0 userlist_email 0 userlist_joindate 1 userlist_lastvisitdate 1 userlist_userhits 0 latestcategory 0 showstats 1 showwhoisonline 0 showgenstats 1 showpopuserstats 1 popusercount 5 showpopsubjectstats 1 popsubjectcount 5 showspoilertag 1 showvideotag 1 showebaytag 1 trimlongurls 1 trimlongurlsfront 40 trimlongurlsback 20 autoembedyoutube 1 autoembedebay 1 ebaylanguagecode en-us sessiontimeout 1800 highlightcode 1 rss_type topic rss_timelimit month rss_limit 100 rss_included_categories rss_excluded_categories rss_specification rss2.0 rss_allow_html 1 rss_author_format name rss_author_in_title 1 rss_word_count 0 rss_old_titles 1 rss_cache 900 defaultpage categories default_sort asc sef 1 showimgforguest 1 showfileforguest 1 pollnboptions 4 pollallowvoteone 1 pollenabled 1 poppollscount 5 showpoppollstats 1 polltimebtvotes 00:15:00 pollnbvotesbyuser 100 pollresultsuserslist 1 maxpersotext 50 ordering_system mesid post_dateformat datetime post_dateformat_hover ago hide_ip 1 imagetypes jpg,jpeg,gif,png checkmimetypes 1 imagemimetypes image/jpeg,image/jpg,image/gif,image/png imagequality 60 thumbheight 100 thumbwidth 100 hideuserprofileinfo put_empty boxghostmessage 0 userdeletetmessage 0 latestcategory_in 1 topicicons 1 debug 0 catsautosubscribed 0 showbannedreason 0 showthankyou 1 showpopthankyoustats 1 popthankscount 5 mod_see_deleted 0 bbcode_img_secure text listcat_show_moderators 1 lightbox 1 show_list_time 720 show_session_type 0 show_session_starttime 0 userlist_allowed 1 userlist_count_users 2 enable_threaded_layouts 1 category_subscriptions post topic_subscriptions every pubprofile 0 thankyou_max 200 email_recipient_count 55 email_recipient_privacy bcc captcha_post_limit 0 keywords 0 userkeywords 0 image_upload everybody file_upload everybody topic_layout flat time_to_create_page 1 show_imgfiles_manage_profile 1 hold_newusers_posts 0 hold_guest_posts 0 attachment_limit 8 pickup_category 1 article_display intro send_emails 1 fallback_english 1 cache 0 cache_time 60 iptracking 1 rss_feedburner_url autolink 1 access_component 1 statslink_allowed 1 superadmin_userlist 0 legacy_urls 1 attachment_protection 0 categoryicons 1 avatarresizemethod 1 avatarcrop 0 user_report 1 searchtime 365 teaser 0 ebay_language 0 twitter_consumer_key twitter_consumer_secret allow_change_subject 1 max_links 50 userlist_name 1 usernamechange 0 version_check 1 userlist_usertype 0 sefutf8 0 enablepdf 1 jmambot 1 annmodid 62 changename 0 userlist_username 1 rules_infb 0 help_infb 0 onlineusers 1| Joomla! detailed language files installed:Warning: Spoiler!Kunena - AlphaUserPoints Disabled
Kunena - Community Builder Enabled: access=1 login=1 activity=1 avatar=1 profile=1 private=0
Kunena - Gravatar Disabled
Kunena - JomSocial Disabled
Kunena - Joomla Enabled: access=1 login=0
Kunena - Kunena Enabled: avatar=0 profile=0
Kunena - UddeIM Enabled: private=1
Joomla! languages installed: en-GB English (en-GB)
Third-party components: CommunityBuilder 2.0.14 | UddeIM 3.9
Third-party SEF components: None
May I ask you, what version of Kunena were you using before you observed this problem? The problems you refer to commenced in K 4.0.5 and we discussed them >>> here <<<
TomasFC wrote: When I upgraded to Kunena 4.0.11 ...
I did not see that thread, even when I searched...
This is what that same file had (Lines 167 to 177):
<?php if ($this->canSubscribe()) : ?> <tr id="kpost-subscribe" class="krow<?php echo 1 + $this->k^=1;?>"> <td class="kcol-first"> <strong><?php echo JText::_('COM_KUNENA_POST_SUBSCRIBE'); ?></strong> </td> <td class="kcol-mid"> <input type="checkbox" name="subscribeMe" id="subscribeMe" value="1" <?php if ($this->subscriptionschecked == 1) echo 'checked="checked"' ?> /> <label for="subscribeMe"><i><?php echo JText::_('COM_KUNENA_POST_NOTIFIED'); ?></i></label> </td> </tr> <?php endif; ?>
In re-reading the code, I see that there is a redundancy after my alteration. I'm not sure the statement after the OR ( || ) is needed, even if the values could be -1, 0 or 1.
your setting is: subscriptionschecked = 0 (the checkbox is not selected by default)
So we look at the second param:
$this->subscriptionschecked == 0 && $this->me->canSubscribe == 1
We can skip the first part, we know that the setting is "0".
Now we come on the user setting.
If the user has enable the option "Select subscription as default" on profile->edit->Forum settings
there you can have 3 options:
1) default = -1
2) Off = 0
3) On = 1
there we see $this->me->canSubscribe == 1, so only if you have turned it on, the box is selected.
So you need to tell your users to change their setting, or you resetting all users their setting, but know that if you change it, nobody get any notifications anymore
The statement is saying that if the subscriptionschecked is 0 then default subscribe the user when he replies to the topic.
And as I understand it, that is the whole point of the "subscriptionchecked" If I set it in the configuration file to 0, I understand it to mean that the default option of the checkbox will NOT be checked. and if it is 1 then, the default check box will be checked.
The code as you wrote it would not allow me to have that box unchecked.
The -1 comes in for the "undecided" users as I see it. If they are undecided on that subscription and the subscriptionschecked is 1, then they will default to checked, but if they have already unsubscribed (0) then it will not show checked as default, even with the subscriptionschecked=1.
Now having seen that, as I said above my change created a redundancy.
Users are in control if they want to get notifications, not the website owner.
If a user want to change this option, then they can do it on their profile setting.
If you want to disable the option, then you need to do a sql query that set the option to -1 or 0.
Then hide the option by css.
First I like to say that Kunena is an amazing software and I've been using it since 2009.
The change I made has solved my issue. However, I understand that it's not right for every situation.
This "bug" was pointed out to me by a user after the upgrade.
i notice, when i post something, it automatically subscribes me to the topic? Was that intentional? as previously this was not the case, and i could subscribe only to the topics i wanted to keep track of...
You have been subscribed to this topic.
Your message has been successfully posted.
I then tested this and the same happened to me for every topic I tried.
I made the change of code and my issue was solved.
It's important to mention that I have always used CB and I've never given users (I didn't know how) the option to modify their "canSubscribe" setting. In looking at the database, every user's setting for "canSubscribe" is "1". I've never changed this value.
Given this, with the changes in the new template, I have NO option in configuration settings to have the default setting for the checkbox unchecked, neither do the users.
My choice is to have users subscribe to a topic, only when they make the effort to check the box. Most users are unaware of the checkbox when they reply to a topic.
Should users on an individual basis want to have the subscription by default for every topic they reply to, I could enable that in the future, but it's never been an option so far.
So since the canSubscribe setting is "1" for every user, and users don't have the option to change it, that line of code as it was, invalidates the option in the settings for subscriptionschecked variable.
Given all this, I should run a query to change all values to -1 for the cansubscribe value so that on the next update I don't have the same issue again.
- Not Allowed: to create new topic.
- Not Allowed: to reply.
- Not Allowed: to edit your message.