Reputation Activity
-
TSP got a reaction from SeNioR- in Cache keys can conflict if both Data\Store and Data\Cache utilize RedisAfter upgrading the server of one of our communities from PHP 7.4 to 8.1 I found the following error message popping up a lot:
TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /www/system/Data/Cache.php:151 This was caused by some custom code being referenced in a custom theme which requested a value with \IPS\Data\Cache::getWithExpire. This is how that function looks currently:
<?php public function getWithExpire( $key, $fallback=FALSE ) { if ( !isset( $this->$key ) ) { throw new \OutOfRangeException; } $data = $this->$key; if( \count( $data ) and isset( $data['value'] ) and isset( $data['expires'] ) ) { // ... } else { unset( $this->$key ); throw new \OutOfRangeException; } } After some debugging I found that $data was indeed a string, and thus can't be counted. My first thought was that you should change from \count( $data ) to \is_array( $data ) in this function, which I still think you should, but the next mystery was to figure out why it would be a string, since you always expect it to be an array, and I used the regular storeWithExpire to save to Cache.
I found the culprit to be former abundance of caution, or what might have been a good reason at the time I implemented it (many many years ago): My code would first request the cache key from \IPS\Data\Cache::getWithExpire. If it didn't find it saved in Cache or it was expired, it would move on to check \IPS\Data\Store, with a 1/15 chance of unsetting it in \IPS\Data\Store to prevent the value from "never" being updated. If it didn't find it in any of them, then it would request the value from an external source and save it to both Data\Cache and Data\Store.
But if both methods utilizes Redis, then it means the second method will just overwrite the cache entry that the first one saved. Data\Cache stores an array to the cache key in Redis, but then Data\Store would immediately overwrite the same cache entry with a string.
You can reproduce with this code:
<?php require_once 'init.php'; $cacheKey = 'storeItPlease3'; $saveToCache = 'Hello world :-) | ' . date(DATE_RFC2822); $expire = \IPS\DateTime::ts( time() + 60 ); try { $cached = \IPS\Data\Cache::i()->getWithExpire( $cacheKey, TRUE ); echo $cached . "\n"; } catch ( \OutOfRangeException $e ) { try { $cached = \IPS\Data\Store::i()->{$cacheKey}; echo "Found in store: {$cached}\n"; if ( rand(1, 15) == 15 ) { unset(\IPS\Data\Store::i()->{$cacheKey}); } } catch(\OutOfRangeException $e2) { echo "Couldn't find in Data\Store!\n"; } echo "Didn't find {$cacheKey}. Write it!\n"; \IPS\Data\Cache::i()->storeWithExpire( $cacheKey, $saveToCache, $expire, TRUE ); \IPS\Data\Store::i()->{$cacheKey} = $saveToCache; } While I understand this kind of situation arising being rare and you probably don't expect people using both methods simultaneously like this, I thought I would still make you aware of it in case you encounter similar reported issues in the future and maybe make some changes to your code. Having a key name be the same in both Store and Cache could also happen by accident, although I guess the chance is rare.
Consider use is_array() rather than, or in addition to count() in \IPS\Data\Cache::getWithExpire (Do you even need that first check, maybe it's enough with the isset()-calls?)
Consider prepending or appending to the cache key for one of the storage methods to differentiate entries in Redis saved by Store and Cache
(Alternatively document that one shouldn't use a key for Store that's already used by Cache or vice versa) -
TSP reacted to Matt in October developer's blog out nowHi all,
Just a note to say that the October developer's blog is out now. It has a little information about our holiday release schedule and a new developer working with us!
-
TSP got a reaction from SeNioR- in \IPS\CACHING_LOG: Can't open dialogs/more information on all entriesI activated the \IPS\CACHING_LOG to debug some issues, but I noticed that I could only open the dialog/modal for the top ones, the cache entries near the bottom I was unable to open the dialog for.
Looking into the HTML, the issue seems to be caused by a sudden change in the naming style of the div that's referenced by data-ipsDialog-content. See the attached image:
For the working items (that brings up the dialog) the form of the name is #elCachingLog<timestamp>_<id>_menu, but then it suddenly changes to #elCachingLog<timestamp>,<id>_menu (It uses , instead of _ between the timestamp and id)
-
TSP got a reaction from SeNioR- in PHP8 will be the minimum version from November 2022This is what I would've done. I was in a similar situation as you, but I got us upgraded from 4.5 to 4.7.3 last week. This week I'm in the process of upgrading our servers to PHP 8.1.
Then I might try to update to 4.7.4 sometime next week.
So download 4.7.3 now from the client area and do a manual upgrade on PHP 7.4. Then update to PHP 8 and then update to 4.7.4++
-
TSP got a reaction from aia in Moderation History on items, filtering out editing of ones own commentsHi,
On topics with a lot of replies the moderator history log can contain a lot of edited comments. Could you consider automatically filter out editing actions where the author of the post and the member editing the post is the same?
Or let us be able to filter out these editing actions of ones own posts manually, by providing a checkbox we can check, or something.
While you're at it, you could even consider introducing more filter options for this tool. For example being able to choose which actions to show. (multi-checkbox)
But I think the most useful filter option, that makes the most sense, is to filter out moderation actions where an account edits one of their own comments.
This is one example from our community:
Thank you for the consideration.
-
TSP reacted to Daniel F in Caching and views/hits increaseThere’s a great way to utilize the cloudflare workers for the guest page counts, so that the page count is increased even if the guest gets only the cached page and the original request never makes it to your own server.
It’s going to take some time, but I’ll share the instructions ( or app) in few weeks
-
TSP got a reaction from Matt in PHP8 will be the minimum version from November 2022I didn't know November only lasts two weeks this year 🙀
Which dates gets thrown under the bus?
-
TSP got a reaction from Jim M in PHP8 will be the minimum version from November 2022I didn't know November only lasts two weeks this year 🙀
Which dates gets thrown under the bus?
-
TSP reacted to Marc in PHP8 will be the minimum version from November 2022Whichever happen to be the coldest. We will let you know 😄
-
TSP got a reaction from Daniel F in PHP8 will be the minimum version from November 2022I didn't know November only lasts two weeks this year 🙀
Which dates gets thrown under the bus?
-
TSP got a reaction from Kjell Iver Johansen in IPS 4: Norwegian Translation (Norsk, bokmål)Har oppdatert språkpakken for 4.7.
-
TSP got a reaction from Percival in Option to automatically follow content anonymouslyWhen you specifically choose to follow content you get the option to choose whether you follow it anonymously or not.
However, when you follow content automatically because you reply it's always followed publicly. Maybe implement a setting members can choose together with the other notification settings on what should be the default behaviour.
-
TSP got a reaction from Ibai in Are all notifications marked as read when bell is clicked?I've also received this feedback from multiple members and communities, that members find it confusing they are all marked as unread when opening the notifications.
Has there been any more discussion on this internally?
-
TSP got a reaction from SeNioR- in Bug (on this community): changing image title on images in posts doesn't stickI tried to change the image titles here:
By editing the post, and double clicking the images, you get additional options.
One of those options is "Image title", which on this community, and other cloud communities, is by default generated text by some AI recognition-service.
I changed these image titles, but upon saving the post, the old AI-generated captions is still there on hover, even after a refresh. And if you edit the post again, you can see it's back to the AI generated captions when double clicking the images.
-
TSP reacted to Daniel F in .gitignore File SetupHi,
this is the file which the developers at IPS use
conf_global.php datastore/*.php uploads/logs/*.php uploads/* plugins/hooks.txt constants.php plugins/hooks.php .DS_Store I hope it helps:)
-
TSP reacted to JohnDar in Template / CSSThank you.
Going forward, maybe the best solution would be to have all CSS showing but read-only, with the ability to revert if differences are found?
-
Hello TSP, thanks for your feedback! I headed up the development of the Data Layer feature and had considered using an array as a breadcrumb property early on, though in an effort to get the feature deployed and fully functional we decided to table it for the time being!
That being said, the feature is still new and being expanded upon, so we appreciate feedback like this so we know which features are more desired!
-
Additionally (I didn't see the bit about logged in status), there already is a logged_in data layer page property that is either 0 or 1, regardless of PII settings. It's disabled by default, but you should see it in the AdminCP > System > Settings > Data Layer > Properties (tab):
-
TSP got a reaction from Matt Finger in 4.7 DataLayer feedback: breadcrumb and loggedIn/guestI currently send some datalayer-information in the themes of the forums I manage.
I saw that you've implemented a datalayer-section and decided to take a peak at whether it would make sense for me to utilize that instead. Initial thoughts is that I'll likely just continue use my own code in our themes.
The information we analyze the most in Google Analytics is these two things:
Comparing guests vs those logged in Which sections are most popular and traffic change etc. for each section In your current implementation you only send information about the closest container. What I would suggest is that you also include the entire breadcrumb data in the default language.
Here’s an example of information I provide, when inside a topic in A Test Category/A Test Forum/Subforum. I provide the same breadcrumb data if viewing the forum, but the controller within the location variable would be forums instead of topic.
dataLayer = [{ 'adblocker': adblock, 'isLoggedIn': isLoggedIn, 'location': {app:"forums", module:"forums", controller:"topic"}, 'isContentPage': isContentPage, 'breadcrumb': ["A Test Category","A Test Forum","Subforum"], 'breadcrumbObj': {"section1":"A Test Category","section2":"A Test Forum","section3":"Subforum"}, 'breadcrumbPath': 'A Test Category/A Test Forum/Subforum', I have it duplicated a bit unnecessarily for … what was probably good reasons once upon a time.
When you have a large community with a lot of sections that each contain numerous forums, and subforums to subforums etc., it makes more sense for us to look at all traffic across all the subforums in a section and then go further down into specific forums from there.
As for my other suggestions it would be to include whether the visitor is logged in or not. Currently you only sort of provide this information if PII is enabled, but I would suggest you just provide an additional true/false field by default, and not having to enable all PII to get data on guests vs logged in.
-
TSP got a reaction from Matt in 4.7 DataLayer feedback: breadcrumb and loggedIn/guestI currently send some datalayer-information in the themes of the forums I manage.
I saw that you've implemented a datalayer-section and decided to take a peak at whether it would make sense for me to utilize that instead. Initial thoughts is that I'll likely just continue use my own code in our themes.
The information we analyze the most in Google Analytics is these two things:
Comparing guests vs those logged in Which sections are most popular and traffic change etc. for each section In your current implementation you only send information about the closest container. What I would suggest is that you also include the entire breadcrumb data in the default language.
Here’s an example of information I provide, when inside a topic in A Test Category/A Test Forum/Subforum. I provide the same breadcrumb data if viewing the forum, but the controller within the location variable would be forums instead of topic.
dataLayer = [{ 'adblocker': adblock, 'isLoggedIn': isLoggedIn, 'location': {app:"forums", module:"forums", controller:"topic"}, 'isContentPage': isContentPage, 'breadcrumb': ["A Test Category","A Test Forum","Subforum"], 'breadcrumbObj': {"section1":"A Test Category","section2":"A Test Forum","section3":"Subforum"}, 'breadcrumbPath': 'A Test Category/A Test Forum/Subforum', I have it duplicated a bit unnecessarily for … what was probably good reasons once upon a time.
When you have a large community with a lot of sections that each contain numerous forums, and subforums to subforums etc., it makes more sense for us to look at all traffic across all the subforums in a section and then go further down into specific forums from there.
As for my other suggestions it would be to include whether the visitor is logged in or not. Currently you only sort of provide this information if PII is enabled, but I would suggest you just provide an additional true/false field by default, and not having to enable all PII to get data on guests vs logged in.
-
TSP got a reaction from Kacperrr_ in Available reputation activity when group can't see who gaveHi,
Currently when a member group is unable to see who reacted to them, it also causes the reputation activity page on the profile to be disabled.
I wish that you'll make this page available even for groups who can't see who reacted to them.
Obviously without telling who gave the reaction Only show reactions given by a user when the user is viewing it's own profile -
TSP got a reaction from SeNioR- in Available reputation activity when group can't see who gaveHi,
Currently when a member group is unable to see who reacted to them, it also causes the reputation activity page on the profile to be disabled.
I wish that you'll make this page available even for groups who can't see who reacted to them.
Obviously without telling who gave the reaction Only show reactions given by a user when the user is viewing it's own profile -
This means the new min version will be higher than the old max version, right? That's really unfortunate for orchestrating the upgrade.
-
TSP got a reaction from IPMSNorge in IPS 4: Norwegian Translation (Norsk, bokmål)Jeg er ikke interessert i å oversette noe annet enn offisielle applikasjoner eller sy sammen flere pakker.
Jeg foreslår at du nesten bare tester. Jeg vil anta at den bare overskriver fraser/ord som er i språkpakken man importerer fra.
-
TSP got a reaction from Kjell Iver Johansen in IPS 4: Norwegian Translation (Norsk, bokmål)Til orientering ble språkpakken oppdatert til 3.6.7 i forrige uke og til 3.6.8 nå i dag.
Du finner språkpakken som vanlig her, men den installeres jo nå fra markedsplassen i adminpanelet. Om du likevel ønsker å laste ned XML-filen så prøver jeg å huske holde den oppdatert på github.