Jump to content

TSP

Clients

Reputation Activity

  1. Like
    TSP got a reaction from wegorz23 in Problem with SQL query that takes a long time to execute   
    We noticed similar issues going from 4.7.13 to 4.7.16. I was in contact with @Matt back then. 
    In our case we ended up reverting to an the code in getItemsWithPermission from an earlier version where we hadn't had that issue with getItemsWithPermission method.
    We also got another issue upgrading to 4.7.17. In that case we ended up reverting some code in _comments()
    Using Mariadb 10.5. But we'll upgrade to either a newer version of MariaDB or Mysql 8.0 or Mysql 8.4 soon-ish, so we hopefully can remove these customizations. 
  2. Like
    TSP got a reaction from Prank in Problem with SQL query that takes a long time to execute   
    We noticed similar issues going from 4.7.13 to 4.7.16. I was in contact with @Matt back then. 
    In our case we ended up reverting to an the code in getItemsWithPermission from an earlier version where we hadn't had that issue with getItemsWithPermission method.
    We also got another issue upgrading to 4.7.17. In that case we ended up reverting some code in _comments()
    Using Mariadb 10.5. But we'll upgrade to either a newer version of MariaDB or Mysql 8.0 or Mysql 8.4 soon-ish, so we hopefully can remove these customizations. 
  3. Like
    TSP got a reaction from SeNioR- in Problem with SQL query that takes a long time to execute   
    We noticed similar issues going from 4.7.13 to 4.7.16. I was in contact with @Matt back then. 
    In our case we ended up reverting to an the code in getItemsWithPermission from an earlier version where we hadn't had that issue with getItemsWithPermission method.
    We also got another issue upgrading to 4.7.17. In that case we ended up reverting some code in _comments()
    Using Mariadb 10.5. But we'll upgrade to either a newer version of MariaDB or Mysql 8.0 or Mysql 8.4 soon-ish, so we hopefully can remove these customizations. 
  4. Like
    TSP got a reaction from Marc in Problem with SQL query that takes a long time to execute   
    We noticed similar issues going from 4.7.13 to 4.7.16. I was in contact with @Matt back then. 
    In our case we ended up reverting to an the code in getItemsWithPermission from an earlier version where we hadn't had that issue with getItemsWithPermission method.
    We also got another issue upgrading to 4.7.17. In that case we ended up reverting some code in _comments()
    Using Mariadb 10.5. But we'll upgrade to either a newer version of MariaDB or Mysql 8.0 or Mysql 8.4 soon-ish, so we hopefully can remove these customizations. 
  5. Like
    TSP got a reaction from Matt in Problem with SQL query that takes a long time to execute   
    We noticed similar issues going from 4.7.13 to 4.7.16. I was in contact with @Matt back then. 
    In our case we ended up reverting to an the code in getItemsWithPermission from an earlier version where we hadn't had that issue with getItemsWithPermission method.
    We also got another issue upgrading to 4.7.17. In that case we ended up reverting some code in _comments()
    Using Mariadb 10.5. But we'll upgrade to either a newer version of MariaDB or Mysql 8.0 or Mysql 8.4 soon-ish, so we hopefully can remove these customizations. 
  6. Haha
    TSP reacted to Matt in ipsGrid   
    Ehren, you look different today.
  7. Like
    TSP reacted to Daniel F in Invision Community 4: A more professional report center   
    Yes, this is a bug.
  8. Like
    We have some. 
    I've provided more details in a reply I just made to the ticket. 
  9. Like
    I upgraded from version 4.7.13 to 4.7.16 on 19th April, and we have since been having trouble with both reduced performance and more downtime. 
    Our server host has looked into this and reported back a major increase in slow queries, major increase in CPU usage for the database server overall and less usage of MySQL Sorts. 

    It seems this increase can be tracked down to methods using IPS\Content\_Item::getItemsWithPermission:317. We have a custom controller and a frontpage widget utilizing this method. 
    Anyone else experienced this, or have any tips on what could be going on? Hope Invision could be interested in lending a hand investigating this too 
    Best regards, Preben
  10. Agree
    TSP got a reaction from Omri Amos in New Spam Prevention Features   
    The "Geolocation based registration filtering" sounds good, but maybe you could also provide an option to flip it to a whitelist? So you can choose a global setting that'll apply when a geolocation filter entry for the country is not present, and then you'll add the countries that should be treated differently/whitelisted instead.
  11. Like
    Steps to reproduce:
    Create a test topic in a forum where guests does NOT have permission to post new topics Reply with a test account, or temporarily allow guests to post topics and replies. If you replied with a test account: delete the test account so the reply becomes a guest post If you posted as a guest: remember to reset the forum permissions to once again disallow guest topics/replies As a moderator: select the reply and split it into a new topic in the same forum with your moderator tools You should be redirected to the new topic created by splitting the posts Instead you'll get an error page: "You do not have permission to view this topic." (Error code: 2F173/K) The reason is that the new topic is saved to the database with the approved column set to -3. Which in system/Content/Content.php is documented as:
    "@li -3 is a post made by a guest using the "post before register" feature"
    Please note that this will happen even if the system "Post before register" is disabled. It shouldn't happen in either cases.
    Also; since there is no way to get a list of topics and replies hidden for this reason, it's not possible to save the topic from the interface, you'll have to manually fix it in the database. 
    I think this happens because of the following code for the function createItem in system/Content/Item.php. 
    I'm pretty sure you'll have to fix the logic for both the approved and hidden switch. 
    <?php case 'approved': if ( $hidden === NULL ) { if ( !$author->member_id and $container and !$container->can( 'add', $author, FALSE ) ) { $val = -3; } else { $val = static::moderateNewItems( $author, $container ) ? 0 : 1; } } else { $val = \intval( !$hidden ); } break; case 'hidden': if ( $hidden === NULL ) { if ( !$author->member_id and $container and !$container->can( 'add', $author, FALSE ) ) { $val = -3; } else { $val = static::moderateNewItems( $author, $container ) ? 1 : 0; } } else { $val = \intval( $hidden ); } break;  
  12. Like
    We're working on a performance review, we've included this information in that project so we can look further into it and do some further benchmarking. We're not seeing the same slowness on our Cloud infrastructure hence my asking about MySQL/MariaDB versions.
  13. Like
    They both have the same version. But my test server is not optimized and is poor configured. I manage it myself and have no idea of how to do it properly. 😅 But I have noticed that my custom application on the test server that uses exact the same function is now slow.
    My live server is well configured by my server admin. So I do not notice any significant difference there. 
  14. Agree
    TSP got a reaction from JohnCourt in New Spam Prevention Features   
    The "Geolocation based registration filtering" sounds good, but maybe you could also provide an option to flip it to a whitelist? So you can choose a global setting that'll apply when a geolocation filter entry for the country is not present, and then you'll add the countries that should be treated differently/whitelisted instead.
  15. Like
    TSP got a reaction from DamonT in New Spam Prevention Features   
    The "Geolocation based registration filtering" sounds good, but maybe you could also provide an option to flip it to a whitelist? So you can choose a global setting that'll apply when a geolocation filter entry for the country is not present, and then you'll add the countries that should be treated differently/whitelisted instead.
  16. Like
    I think it's good SEO-improvements is done, but in this case I feel it's at the expense of guest user experience. Why can't this be solved with indicating nofollow or adding it to robots.txt? If the link is not gonna take you to what you expect as a guest, then why have it be a link for them in the first place.
  17. Like
    When approving an account deletion request, the message says:
    "Please confirm that you want to delete %s. The member's content will be left in the database, but flagged as Guest content."
    What does this mean exactly? Will the content show up under an anonymous guest post, a post under the original username with an added "(Guest)" to it? And why is there no option to delete the user's content?
    When deleting an account manually, we get all sorts of options. If that is really missing here, then I suggest you add this to account deletion requests.
  18. Like
    TSP got a reaction from SeNioR- in Standalone web-app, iOS: should give feedback page is loading   
    It seems the only way to get push alerts on iOS is to choose "Standalone" as the display mode in the manifest.
    Problem I see is that if any page in the community takes a bit long too load, it looks to the user as if nothing is happening. In the standard Safari iOS browser you can see the loading indication under the address bar that pops up when you click something, but nothing like that appears in a standalone web-app. 
    Obviously slow loading times should be investigated and resolved, but I feel there should still be some feedback from the UI that loading is in progress, otherwise the user will just try to click multiple times. 
    I'm not sure if there's something that could be added to the manifest to resolve this, or if you could work on something else, but I think you should investigate some UX improvement here.
  19. Agree
    It seems the only way to get push alerts on iOS is to choose "Standalone" as the display mode in the manifest.
    Problem I see is that if any page in the community takes a bit long too load, it looks to the user as if nothing is happening. In the standard Safari iOS browser you can see the loading indication under the address bar that pops up when you click something, but nothing like that appears in a standalone web-app. 
    Obviously slow loading times should be investigated and resolved, but I feel there should still be some feedback from the UI that loading is in progress, otherwise the user will just try to click multiple times. 
    I'm not sure if there's something that could be added to the manifest to resolve this, or if you could work on something else, but I think you should investigate some UX improvement here.
  20. Like
    It seems the only way to get push alerts on iOS is to choose "Standalone" as the display mode in the manifest.
    Problem I see is that if any page in the community takes a bit long too load, it looks to the user as if nothing is happening. In the standard Safari iOS browser you can see the loading indication under the address bar that pops up when you click something, but nothing like that appears in a standalone web-app. 
    Obviously slow loading times should be investigated and resolved, but I feel there should still be some feedback from the UI that loading is in progress, otherwise the user will just try to click multiple times. 
    I'm not sure if there's something that could be added to the manifest to resolve this, or if you could work on something else, but I think you should investigate some UX improvement here.
  21. Haha
    TSP reacted to Matt Finger in April Release Chat: Rescheduled!   
    Same. I actually read notifications now instead of pretend I didn't see emails
  22. Like
    I think it's good SEO-improvements is done, but in this case I feel it's at the expense of guest user experience. Why can't this be solved with indicating nofollow or adding it to robots.txt? If the link is not gonna take you to what you expect as a guest, then why have it be a link for them in the first place.
  23. Like
    TSP got a reaction from SeNioR- in Change default action when deleting member   
    Can the default action when deleting a member be changed from Delete to Leave? 
    In our case it will always be "Leave" and "Continue to attribute" (we change member name to random string before deleting)
     
  24. Like
    Ok, looks like this one has already been resolved. 
    Sorry
     
  25. Like
    After 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)