Jump to content

teraßyte

Clients
  • Posts

    33,395
  • Joined

  • Days Won

    47

Reputation Activity

  1. Like
    teraßyte got a reaction from SeNioR- in [BUG 4.7.16] Announcements allow an end date before the starting date   
    When adding an announcement it's possible to select an ending date before the starting date. When that happens that announcement will never show.
    Example:
    Start date: 26 March End date: 7 March (instead of 7 April)  
    When adding/editing an announcement, it should throw an error if the end date comes before the starting one.
  2. Like
    teraßyte got a reaction from Afrodude in [BUG 4.7.16] The s3Delete task is not activated correctly when deleting an Amazon S3 container   
    In the file /system/File/Amazon.php inside the function deleteContainer() this code is executed when adding a new delete task to delete the files in a bucket folder (container):
    /* Turn on task */ \IPS\Db::i()->update( 'core_tasks', array( 'enabled' => 1 ), array( '`key`=?', 's3_delete' ) ); The problem is that the task's key is not s3_delete but s3Delete (no space + capitalized). This causes the task to delete the S3 files to not activate correctly.
     
    The same issue is also present inside the code of the s3Delete task to disable itself in 2 different locations.
    Lines 44-50:
    if ( !( $obj instanceof \IPS\File\Amazon ) ) { /* Class is not Amazon, so just stop here and truncate the table as there's nothing we can really do now. */ \IPS\Db::i()->delete( 'core_s3_deletions' ); \IPS\Db::i()->update( 'core_tasks', array( 'enabled' => 0 ), array( '`key`=?', 's3_delete' ) ); return NULL; } Lines 96-97:
    /* Nothing to do, so switch off the task */ \IPS\Db::i()->update( 'core_tasks', array( 'enabled' => 0 ), array( '`key`=?', 's3_delete' ) );  
    Again s3_delete is being used instead of s3Delete.
  3. Haha
    teraßyte reacted to Jim M in [BUG 4.7.16] Announcements allow an end date before the starting date   
    Dear users living in the past, please be made aware of this. Love, Administrators.
    --------
    Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
     
  4. Agree
    teraßyte got a reaction from AndyF in Forum total stats rounded up ?   
    There was a paid modification from DevFuse for this, but it's not available anymore. The developer has recently gone missing. You'll need someone to make a new modification for you. 🤷‍♂️
     
    EDIT:
    I take that back. Looks like Adriano made a new modification for it already: https://www.invisioneer.org/files/file/220-disable-friendly-number-format/
  5. Like
    teraßyte got a reaction from Buttercup in Question about pages   
    You have the old license most likely, but it's possible to upgrade to a Classic License from your client area.
     
    Check this topic for more info: 
     
     
  6. Thanks
    teraßyte got a reaction from David N. in Invision Community 5: Assign topics to moderators   
    I don't think normal members will be able to see that someone is assigned to the topic. I might be wrong, though. 🙄
  7. Agree
    teraßyte got a reaction from Afrodude in Invision Community 5: Assign topics to moderators   
    I don't think normal members will be able to see that someone is assigned to the topic. I might be wrong, though. 🙄
  8. Like
    teraßyte got a reaction from sean182011 in How to create a private community?   
    Here's a link to the guide:
     
  9. Like
    teraßyte got a reaction from sean182011 in How to create a private community?   
    If you disable the guest group from accessing the site, nobody, not even search engines, will see the content.
    If you also want to control who registers and can see the content, enable the admin validation for new accounts. Or you can disable new registrations, and manually add the accounts for the club if they're only a few. Or only allow certain email domains to register if your club has a specific domain for all members.
  10. Like
    teraßyte got a reaction from Marc Stridgen in New member email confirmation not sent/received? [DMARC?]   
    I had the same issue recently. I received errors that Gmail rejected my emails because they did not pass DKIM/SPF.
    Switching from the PHP mail method to SMTP increased my score on https://www.mail-tester.com/ and the emails started being delivered again.
  11. Like
    teraßyte got a reaction from PinPics in Where are Followers of a Member stored?   
    The data is in the core_follow table. They need to filter by:
    follow_app=core follow_area=member follow_rel_id=XXX (where XXX is the member ID)
  12. Like
    teraßyte got a reaction from Afrodude in Where are Followers of a Member stored?   
    The data is in the core_follow table. They need to filter by:
    follow_app=core follow_area=member follow_rel_id=XXX (where XXX is the member ID)
  13. Like
    teraßyte got a reaction from SeNioR- in Where are Followers of a Member stored?   
    The data is in the core_follow table. They need to filter by:
    follow_app=core follow_area=member follow_rel_id=XXX (where XXX is the member ID)
  14. Like
    teraßyte got a reaction from Marc Stridgen in REST API /cms/records/{databaseId} POST fails with 500 in 4.7.16   
    @Clover13 To reproduce the bug, the database must have the Store revisions option enabled. Most likely the test was made on a database with it disabled.
    I initially thought too the error was coming from saving the record to the database, only after re-checking your last screenshot I noticed it was a revision instead. 😅
  15. Like
    teraßyte got a reaction from Kimmo in Updating old and quite big forum to the latest version   
    You upload the new files to the server in the same location as the old ones and then run the upgrade script from /admin/upgrade/ in your browser.
    In case the site is big, the upgrade script might ask you to run some manual MySQL queries from SSH.
     
    For more info look at the Manual Upgrade section of this guide:
     
    However, check first if your server has all the requirements to run the latest version:
     
    Quick note: the check script will give you the green light also for PHP 8.2+, but only PHP 8.0 and 8.1 are supported. 😋
     
    If you're unsure of how to proceed yourself or just want someone to help, it's possible to hire a 3rd party provider to do the upgrade for you: https://invisioncommunity.com/third-party/providers-directory/
    I'm also on that list if you want to send me a PM.
     
    EDIT: @Marc Stridgen beat me to it. 😛
  16. Thanks
    teraßyte got a reaction from Clover13 in REST API /cms/records/{databaseId} POST fails with 500 in 4.7.16   
    @Clover13 To reproduce the bug, the database must have the Store revisions option enabled. Most likely the test was made on a database with it disabled.
    I initially thought too the error was coming from saving the record to the database, only after re-checking your last screenshot I noticed it was a revision instead. 😅
  17. Like
    teraßyte got a reaction from Afrodude in REST API /cms/records/{databaseId} POST fails with 500 in 4.7.16   
    Looking again at the screenshot, the error is being thrown when a revision for the record is added to the database, not when the record itself is added. If you're adding a new record, it shouldn't store a revision. A revision should be saved only when you edit a record.
     
    The problem is in /applications/cms/api/records.php in the _createOrUpdate() function (lines 424-443):
    /* Store a revision before we change any values */ if ( $item::database()->revisions ) { $revision = new \IPS\cms\Records\Revisions; $revision->database_id = $item::$customDatabaseId; $revision->record_id = $item->_id; $revision->data = $item->fieldValues( TRUE ); if ( $this->member ) { $memberId = $this->member->member_id; } else { $memberId = $item->author()->member_id; } $revision->member_id = $memberId; $revision->save(); }  
    The IF check should also check if you're editing a record because when adding a new one there is no record ID available yet (thus the column NULL error):
    if ( $type == 'edit' AND $item::database()->revisions )
  18. Agree
    teraßyte got a reaction from Clover13 in REST API /cms/records/{databaseId} POST fails with 500 in 4.7.16   
    Looking again at the screenshot, the error is being thrown when a revision for the record is added to the database, not when the record itself is added. If you're adding a new record, it shouldn't store a revision. A revision should be saved only when you edit a record.
     
    The problem is in /applications/cms/api/records.php in the _createOrUpdate() function (lines 424-443):
    /* Store a revision before we change any values */ if ( $item::database()->revisions ) { $revision = new \IPS\cms\Records\Revisions; $revision->database_id = $item::$customDatabaseId; $revision->record_id = $item->_id; $revision->data = $item->fieldValues( TRUE ); if ( $this->member ) { $memberId = $this->member->member_id; } else { $memberId = $item->author()->member_id; } $revision->member_id = $memberId; $revision->save(); }  
    The IF check should also check if you're editing a record because when adding a new one there is no record ID available yet (thus the column NULL error):
    if ( $type == 'edit' AND $item::database()->revisions )
  19. Thanks
    teraßyte got a reaction from SeNioR- in [BUG 4.7.16] Incosistent implementation of core extension "EditorLocations::attachmentLookup()"   
    As per the title, the implementation of the extension's EditorLocations::attachmentLookup() method is inconsistent when you don't allow attachments. No matter how I implement it, or which exception I throw, it won't work for all locations.
     
    1) \applications\core\extensions\core\EditorMedia\Attachment.php (lines 140-156):
    The code checks if the method exists before calling it. The code checks for 2 exceptions being thrown: \LogicException \BadMethodCallException if( method_exists( static::$loadedExtensions[$map['location_key']], 'attachmentLookup')) { try { $url = static::$loadedExtensions[$map['location_key']]->attachmentLookup($map['id1'], $map['id2'], $map['id3']); /* Test url() method to prevent BadMethodCallException from the template below - an attachment may be located within a Node class that doesn't support urls, such as CMS Blocks. */ if ($url instanceof \IPS\Content or $url instanceof \IPS\Node\Model){ $url->url(); } static::$locations[$attachId][] = $url; } catch (\LogicException $e) { } catch (\BadMethodCallException $e) { } }  
    2) \applications\core\modules\admin\overview\files.php (lines 209-219):
    The code checks if the method exists before calling it. The code checks for a single exception being thrown: \LogicException if ( isset( $loadedExtensions[ $map['location_key'] ] ) AND method_exists( $loadedExtensions[ $map['location_key'] ], 'attachmentLookup' ) ) { try { if ( $url = $loadedExtensions[ $map['location_key'] ]->attachmentLookup( $map['id1'], $map['id2'], $map['id3'] ) ) { $locations[] = $url; } } catch ( \LogicException $e ) { } }  
    3) \applications\core\modules\front\system\attachments.php (lines 87-100):
    The code doesn't check if the method exists before calling it. The code checks for a single exception being thrown: \OutOfRangeException /* Check Permission */ $exploded = explode( '_', $attachment['location_key'] ); try { $extensions = \IPS\Application::load( $exploded[0] )->extensions( 'core', 'EditorLocations' ); if ( isset( $extensions[ $exploded[1] ] ) ) { $attachmentItem = $extensions[ $exploded[1] ]->attachmentLookup( $attachment[ 'id1' ], $attachment[ 'id2' ], $attachment[ 'id3' ] ); } } catch ( \OutOfRangeException $e ) { \IPS\Output::i()->json( array( 'error' => 'no_permission' ) ); }  
    4) \system\Content\Statistics.php (lines 398-408):
    The code doesn't check if the method exists before calling it. The code checks for a single exception being thrown: \LogicException \BadMethodCallException if ( isset( static::$loadedExtensions[ $map['location_key'] ] ) ) { try { $url = static::$loadedExtensions[ $map['location_key'] ]->attachmentLookup( $map['id1'], $map['id2'], $map['id3'] ); $return[ $k ]['commentUrl'] = (string) $url->url(); } catch ( \LogicException $e ) { } catch ( \BadMethodCallException $e ){ } }  
    ===
    To make a summary of the implementations:
    All OK. It should check for the \BadMethodCallException exception. It should check if the method exists before calling it, and both \LogicException and \BadMethodCallException exceptions aren't being checked. Rather, it checks for a \OutOfRangeException exception which is never thrown according to the method's phpDoc. It should check if the method exists before calling it.  
    I could throw a \LogicException, but as it is it would break implementation #3 anyway.
  20. Like
    teraßyte got a reaction from Afrodude in [BUG 4.7.16] Incosistent implementation of core extension "EditorLocations::attachmentLookup()"   
    As per the title, the implementation of the extension's EditorLocations::attachmentLookup() method is inconsistent when you don't allow attachments. No matter how I implement it, or which exception I throw, it won't work for all locations.
     
    1) \applications\core\extensions\core\EditorMedia\Attachment.php (lines 140-156):
    The code checks if the method exists before calling it. The code checks for 2 exceptions being thrown: \LogicException \BadMethodCallException if( method_exists( static::$loadedExtensions[$map['location_key']], 'attachmentLookup')) { try { $url = static::$loadedExtensions[$map['location_key']]->attachmentLookup($map['id1'], $map['id2'], $map['id3']); /* Test url() method to prevent BadMethodCallException from the template below - an attachment may be located within a Node class that doesn't support urls, such as CMS Blocks. */ if ($url instanceof \IPS\Content or $url instanceof \IPS\Node\Model){ $url->url(); } static::$locations[$attachId][] = $url; } catch (\LogicException $e) { } catch (\BadMethodCallException $e) { } }  
    2) \applications\core\modules\admin\overview\files.php (lines 209-219):
    The code checks if the method exists before calling it. The code checks for a single exception being thrown: \LogicException if ( isset( $loadedExtensions[ $map['location_key'] ] ) AND method_exists( $loadedExtensions[ $map['location_key'] ], 'attachmentLookup' ) ) { try { if ( $url = $loadedExtensions[ $map['location_key'] ]->attachmentLookup( $map['id1'], $map['id2'], $map['id3'] ) ) { $locations[] = $url; } } catch ( \LogicException $e ) { } }  
    3) \applications\core\modules\front\system\attachments.php (lines 87-100):
    The code doesn't check if the method exists before calling it. The code checks for a single exception being thrown: \OutOfRangeException /* Check Permission */ $exploded = explode( '_', $attachment['location_key'] ); try { $extensions = \IPS\Application::load( $exploded[0] )->extensions( 'core', 'EditorLocations' ); if ( isset( $extensions[ $exploded[1] ] ) ) { $attachmentItem = $extensions[ $exploded[1] ]->attachmentLookup( $attachment[ 'id1' ], $attachment[ 'id2' ], $attachment[ 'id3' ] ); } } catch ( \OutOfRangeException $e ) { \IPS\Output::i()->json( array( 'error' => 'no_permission' ) ); }  
    4) \system\Content\Statistics.php (lines 398-408):
    The code doesn't check if the method exists before calling it. The code checks for a single exception being thrown: \LogicException \BadMethodCallException if ( isset( static::$loadedExtensions[ $map['location_key'] ] ) ) { try { $url = static::$loadedExtensions[ $map['location_key'] ]->attachmentLookup( $map['id1'], $map['id2'], $map['id3'] ); $return[ $k ]['commentUrl'] = (string) $url->url(); } catch ( \LogicException $e ) { } catch ( \BadMethodCallException $e ){ } }  
    ===
    To make a summary of the implementations:
    All OK. It should check for the \BadMethodCallException exception. It should check if the method exists before calling it, and both \LogicException and \BadMethodCallException exceptions aren't being checked. Rather, it checks for a \OutOfRangeException exception which is never thrown according to the method's phpDoc. It should check if the method exists before calling it.  
    I could throw a \LogicException, but as it is it would break implementation #3 anyway.
  21. Like
    teraßyte got a reaction from DawPi in [BUG 4.7.16] Incosistent implementation of core extension "EditorLocations::attachmentLookup()"   
    As per the title, the implementation of the extension's EditorLocations::attachmentLookup() method is inconsistent when you don't allow attachments. No matter how I implement it, or which exception I throw, it won't work for all locations.
     
    1) \applications\core\extensions\core\EditorMedia\Attachment.php (lines 140-156):
    The code checks if the method exists before calling it. The code checks for 2 exceptions being thrown: \LogicException \BadMethodCallException if( method_exists( static::$loadedExtensions[$map['location_key']], 'attachmentLookup')) { try { $url = static::$loadedExtensions[$map['location_key']]->attachmentLookup($map['id1'], $map['id2'], $map['id3']); /* Test url() method to prevent BadMethodCallException from the template below - an attachment may be located within a Node class that doesn't support urls, such as CMS Blocks. */ if ($url instanceof \IPS\Content or $url instanceof \IPS\Node\Model){ $url->url(); } static::$locations[$attachId][] = $url; } catch (\LogicException $e) { } catch (\BadMethodCallException $e) { } }  
    2) \applications\core\modules\admin\overview\files.php (lines 209-219):
    The code checks if the method exists before calling it. The code checks for a single exception being thrown: \LogicException if ( isset( $loadedExtensions[ $map['location_key'] ] ) AND method_exists( $loadedExtensions[ $map['location_key'] ], 'attachmentLookup' ) ) { try { if ( $url = $loadedExtensions[ $map['location_key'] ]->attachmentLookup( $map['id1'], $map['id2'], $map['id3'] ) ) { $locations[] = $url; } } catch ( \LogicException $e ) { } }  
    3) \applications\core\modules\front\system\attachments.php (lines 87-100):
    The code doesn't check if the method exists before calling it. The code checks for a single exception being thrown: \OutOfRangeException /* Check Permission */ $exploded = explode( '_', $attachment['location_key'] ); try { $extensions = \IPS\Application::load( $exploded[0] )->extensions( 'core', 'EditorLocations' ); if ( isset( $extensions[ $exploded[1] ] ) ) { $attachmentItem = $extensions[ $exploded[1] ]->attachmentLookup( $attachment[ 'id1' ], $attachment[ 'id2' ], $attachment[ 'id3' ] ); } } catch ( \OutOfRangeException $e ) { \IPS\Output::i()->json( array( 'error' => 'no_permission' ) ); }  
    4) \system\Content\Statistics.php (lines 398-408):
    The code doesn't check if the method exists before calling it. The code checks for a single exception being thrown: \LogicException \BadMethodCallException if ( isset( static::$loadedExtensions[ $map['location_key'] ] ) ) { try { $url = static::$loadedExtensions[ $map['location_key'] ]->attachmentLookup( $map['id1'], $map['id2'], $map['id3'] ); $return[ $k ]['commentUrl'] = (string) $url->url(); } catch ( \LogicException $e ) { } catch ( \BadMethodCallException $e ){ } }  
    ===
    To make a summary of the implementations:
    All OK. It should check for the \BadMethodCallException exception. It should check if the method exists before calling it, and both \LogicException and \BadMethodCallException exceptions aren't being checked. Rather, it checks for a \OutOfRangeException exception which is never thrown according to the method's phpDoc. It should check if the method exists before calling it.  
    I could throw a \LogicException, but as it is it would break implementation #3 anyway.
  22. Like
    teraßyte got a reaction from I_cant_Swim_ in Where are PM strings stored?   
    The API currently allows only 3 options:
    Create a new personal conversation Add a reply to an existing personal conversation Delete an existing personal conversation  
    There is no way to list/retrieve a member's personal conversations right now. 🤷‍♂️
  23. Thanks
    teraßyte got a reaction from Sonya* in [BUG 4.7.7] New Images tab in profile always shows even if there's no content   
    As mentioned in the topic's title, in 4.4.7 with the new gallery version includes a new IMAGES profile extension when viewing a member profile. However, unlike other tabs (for example the ALBUMS TAB in the same gallery application) it doesn't check if the user has uploaded any images before deciding if it should be shown or not.
     
    This is the code inside /applications/gallery/extensions/core/Profile/galleryImages.php:
    public function showTab(): bool { return TRUE; } The ALBUMS profile extension in the same folder (gallery.php) does check if the user has any albums before showing the profile's tab.
  24. Agree
    teraßyte reacted to Nathan Explosion in 4.7.16 update doesn't work   
    Seeing as there were some other people who reported this and were actually running an unsupported version of PHP...what version of PHP do you currently have in use? (view it on the Support page in the ACP)
    If it is NOT 8.0 or 8.1, and is 8.2 or 8.3 then drop down to a support version (8.0 & 8.1)
  25. Agree
    teraßyte reacted to Driven 2 Services in Disable Right Click   
    This will do absolutely nothing to stop copying images from your site. 
    All it takes is Ctrl-U to see the page source including the image link, or a screen shot, a setting in some browsers to block right-click disabling, or using a browser extension.
    More than stopping anyone, what you will accomplish is annoying people trying to use the back/forward/print/paste controls.  Also, because many screen readers require right-click, you're possibly running afoul of disability laws.
    3 decades of failed blocking right clicks as "protection", yet it still persist! 
    You're better off watermarking/digital fingering printing them then filing DMCA requests if they show up elsewhere.
×
×
  • Create New...