Jump to content

teraßyte

Clients
  • Posts

    33,811
  • Joined

  • Last visited

  • Days Won

    55

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Projects

Release Notes v5

Invision Community 5 Bug Tracker

Forums

Events

Store

Gallery

Everything posted by teraßyte

  1. I hit the error updating an old 3.1.4 site with Downloads 2.3.1. The problem is that an upgrade script uses the wrong index type when updating the custom fields in the 4.0.0 RC 1 step. I compared the upgrader code to the normal code run when a new custom field is added and noticed the wrong type is being used. Open the file and find this code on lines 26-54: /** * Step 1 * Fixing custom fields * * @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops) */ public function step1() { foreach( \IPS\Db::i()->select( '*', 'downloads_cfields' ) as $field ) { if( $field['cf_type'] == 'Select' ) { try { \IPS\Db::i()->dropIndex( 'downloads_ccontent', "field_" . $field['cf_id'] ); \IPS\Db::i()->dropColumn( 'downloads_ccontent', "field_" . $field['cf_id'] ); } catch ( \IPS\Db\Exception $e ) { } \IPS\Db::i()->addColumn( 'downloads_ccontent', array( 'name' => "field_" . $field['cf_id'], 'type' => 'TEXT' ) ); \IPS\Db::i()->addIndex( 'downloads_ccontent', array( 'type' => 'key', 'name' => "field_" . $field['cf_id'], 'columns' => array( "field_" . $field['cf_id'] ) ) ); } } return TRUE; } The problem in this case is the addIndex() call on line 49 which uses key as index type instead of fulltext. Here's how I changed it to match the code when adding a new custom field in ACP: \IPS\Db::i()->addIndex( 'downloads_ccontent', array( 'type' => 'fulltext', 'name' => "field_" . $field['cf_id'], 'columns' => array( "field_" . $field['cf_id'] ) ) );
  2. I hit the error updating an old 3.1.4 site. The problem is that some packages have a NULL or empty string value for the p_base_price column in the nexus_packages table instead of 0. The upgrade process stops because MYSQL complains about a "Truncated incorrect DOUBLE value" error. Open the file \applications\nexus\setup\upg_40000\upgrade.php and fine the code on lines 585-594: public function step14() { $offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0; $select = \IPS\Db::i()->select( '*', 'nexus_packages', NULL, 'p_id', array( $offset, 50 ) ); if ( \count( $select ) ) { foreach ( $select as $row ) { \IPS\Lang::saveCustom( 'nexus', "nexus_package_{$row['p_id']}", $row['p_name'] ); \IPS\Lang::saveCustom( 'nexus', "nexus_package_{$row['p_id']}_assoc", $row['p_assoc_error'] ); I simply added this code below right at the start of the foreach cycle to fix the issue: # Change NULL or EMPTY STRING prices to 0 to avoid "Truncated incorrect DOUBLE value" errors $row['p_base_price'] = empty($row['p_base_price']) ? 0 : $row['p_base_price'];
  3. Yeah, they should make it a bit more obvious that there's a renewal pending. I've seen a lot of people confused by it. 👀
  4. While I was looking into changing the number of comments per page for database records (see this link) I found out that IPS actually already allows to control it. The problem is that the number is tied to the setting that also controls the number of records shown per page. The setting I'm talking about is "Field Options > Records per page" when editing a database settings. The name implies it controls the number of records, but at the same time it controls also the number of comments: /** * Set custom posts per page setting * * @return int */ public static function getCommentsPerPage() { if ( ! empty( \IPS\cms\Databases\Dispatcher::i()->recordId ) ) { $class = 'IPS\cms\Records' . static::$customDatabaseId; try { $record = $class::load( \IPS\cms\Databases\Dispatcher::i()->recordId ); if ( $record->_forum_record and $record->_forum_comments and \IPS\Application::appIsEnabled('forums') ) { return \IPS\forums\Topic::getCommentsPerPage(); } } catch( \OutOfRangeException $e ) { /* recordId is usually the record we're viewing, but this method is called on recordFeed widgets in horizontal mode which means recordId may not be __this__ record, so fail gracefully */ return static::database()->field_perpage; } } else if( static::database()->forum_record and static::database()->forum_comments and \IPS\Application::appIsEnabled('forums') ) { return \IPS\forums\Topic::getCommentsPerPage(); } return static::database()->field_perpage; } While simply changing the text to mention it controls also comments can be a fix, I would rather you add a separate setting that controls comments specifically. Without a new setting it would be impossible to keep showing 25 records per page but only 5 comments per page. You'd have to also show only 5 records per page. It's not ideal to have the same setting control both.
  5. A new 1.0.1 version is currently pending approval from IPS. Here's a preview of the changelog: @Hisashi I looked into your request and I found out that CMS already provides a way for an admin to change the number of comments per page. The problem is that it is tied to the Database setting in "Field Options > Records per page". As the name implies this setting control the number of records shown while viewing a category, but I found out it also controls the number of comments per page at the same time. The problem is that you can't have 25 records show per page and only 5 comments; it's either 25 records/comments or 5 records/comments. Now, this to me looks like a bug actually. Depending on how IPS decides to handle the situation there's no need for me to add it to my plugin. For now I'm going to make a bug report for IPS to look into it. EDIT The bug report is here:
  6. Yeah, looks like that plugin is quite old. The $anonymous parameter was added back in 4.6 if I remember right.
  7. That's the standard download attachment link, but newer ones usually have a security key in them. Are the ones you can't download all uploaded after a certain date perhaps? If so, it may be because the security key is missing from the download link that you're getting the error. But as Jim M said, that's a custom modification so you should contact whoever made it for you. If they're not available anymore you can look at the Providers list to find a new developer to take a look at it for you:
  8. Are you using 4.6 or an earlier version perhaps? The new hCaptcha option is available only in 4.7.0:
  9. @My Sharona Yes and no. WebP is supported, but there's a bug in 4.7.0 preventing it from being allowed in several places (basically any forms with upload fields that allow images).
  10. The suite not being able to load that single file is clearly some kind of permission issue with the server. You could try bypassing that error screen with the UPGRADE_MD5_CHECK constant, but that wouldn't resolve the root issue and the upgrader might still break later on. I guess your last resort would be to change hosting...? 🙄
  11. As @Dean_ said you are running a really old version. Even IPS doesn't support upgrades from it anymore. If you are comfortable upgrading yourself that's an option, otherwise you can hire someone else to do it for you if you are unsure on how to proceed. You'll also want to check the modifications you have, if there are updated versions of them available in the marketplace, and if not consider hiring someone to update them for you if you don't know how. You can find someone in the Providers list filtering by IPS Legacy Upgrades for help with the upgrade and filter by the Programming options for help in updating eventual custom modifications: https://invisioncommunity.com/third-party/providers/ I'm on that list too if you need help. 😉
  12. Usually the author would provide some kind of upgrade option. What script are you talking about specifically?
  13. The extension for group promotions (Member Filter) currently allows to add only filters based on which members are promoted. I'd like to see a new option to also add additional actions. For example I was asked to add an option to promote members to a specific VIP Group for this application: Admins can setup to move members into the VIP group, but they can't setup a VIP expiration date, send a PM notification, etc. Being able to execute extra actions means I can run my own code to setup things in the backend as if the member was manually added (which is the only way at the time of posting this topic).
  14. Ops, sorry guys. I've had the update ready since last week but I completely forgot to release it... 😅 The file is currently pending approval from IPS. Also, considering everything I added, the new version is 1.1.0. Here's the changelog: I also looked into group promotions, but the only option available is to add filters based on which members are promoted. There is no way to execute extra actions with the current extension provided by the IPS framework. For now I made a request in the developer forum to include more options in the extension:
  15. That means the forum can't connect to the mysql database. Possible causes: The user is wrong. The password is wrong. The user doesn't have the needed permissions for the database. For #1 and #2 you can edit the conf_global.php file. For #3 you need to check your server, something like Cpanel, DirectAdmin, or whatever else you use.
  16. The file is not marked as compatible with 4.7 in the marketplace (only 4.5 & 4.6) so it won't show up in Admin CPs running 4.7.
  17. Have you tried deleting the Db.php file before reuploading/overwriting it? It happened to me once that a file was somehow "stuck" and it wouldn't work no matter how many times I tried replacing it. In the end deleting the file first before reuploading it fixed the issue for me in that case. No idea if it will work for you, but it's worth a shot.
  18. Until IPS changes how Q&A forums work you can use this plugin in case ordering by votes is not required:
  19. You'll also need to upgrade PHP at least to 7.4 before upgrading the forum to the latest version. PHP 8 would be even better. You can ask your hosting about that, unless you manage also the server yourself.
  20. Your core_sessions table crashed, most likely caused by the server outage you mentioned: You can repair the table from phpMyAdmin or a similar tool. If you are unsure on how to do it it's probably best if you ask your hosting for assistance instead.
  21. Based on the error you have a custom Nexus gateway that is not updated for the latest version and the PHP upgrade is now making it throw a fatal error. The NmiCom gateway applications/nexus/sources/Gateway/NmiCom/NmiCom.php isn't a default one provided by IPS.
  22. Are they all using the same browser? It could also be a browser update causing issue.
  23. There's shouldn't be any need of editing the core files themselves, rather it would be more troublesome as you'd have to redo the edits with every upgrade. You should be able to accomplish everything with applications or plugins. Nathan already provided a link to the Developer Mode guide above, but in case you have trouble figuring it out yourself there's also the option of hiring someone who already knows the framework. A list of available developers for hire can be found here: https://invisioncommunity.com/third-party/providers/ (I'm on it, too 😉)
  24. I've seen this error a lot with ImageMagick lately. It seems a recent version has broken (?) the code that handles GIF images. You can either ask your hosting to go back to a previous ImageMagick or switch the image setting in ACP to GD instead.
×
×
  • Create New...