Jump to content

teraßyte

Clients
  • Joined

Everything posted by teraßyte

  1. This has always been the case. Even in 4.x. Any "unused/uninserted" attachments are automatically added at the bottom of the content. The only way to avoid it is to delete the unused files before submitting the content.
  2. If there is no title/custom words for a string in a language pack, it should ideally fall back to using the default language pack's value. 🙄
  3. I have a custom application that extends the Item::buildCreateForm() function with this kind of code: /** * Build form to create * * @param Model|NULL $container Container (e.g. forum), if appropriate * @param Item|NULL $item Content item, e.g. if editing * @return Form * @throws Exception */ protected static function buildCreateForm( Model|null $container=NULL, Item|null $item=NULL ): Form { # Parent call $form = parent::buildCreateForm( $container, $item ); # Add custom headers: [ header title => insert after field ] foreach( [ 'header_1' => 'title', 'header_2' => 'field_3', 'header_3' => 'field_8', 'header_4' => 'field_12' ] as $header => $field ) { $form->addHeader( static::$formLangPrefix . $header, static::$formLangPrefix . $field ); } return $form; } With this code, there should be 4 headers in the form output, but it always shows a single header because of a bug with the addHeader() function: /** * Add Header * * @param string $lang Language key * @param string|null $after The key of element to insert after * @param string|null $tab The tab to insert onto * @return void */ public function addHeader( string $lang, string $after=NULL, string $tab=NULL ) : void { /* Place the input into the correct position */ $this->_insert( Theme::i()->getTemplate( 'forms', 'core' )->header( $lang, "{$this->id}_header_{$lang}" ), NULL, $tab, $after ); } The problem is that the second parameter, $elementKey, is always NULL, and causes an issue inside the _insert() function: /** * Actually place the element in the correct position * * @param mixed $element Thing we are adding (could be a form input, message, etc.) * @param string|null $elementKey The key of the element * @param string|null $tab The tab to insert this thing into * @param string|null $after The key of the element we want to insert this thing after * @return void */ protected function _insert( mixed $element, string $elementKey=NULL, string $tab=NULL, string $after=NULL ) : void { $tab = $tab ?: $this->currentTab; if ( $after ) { $elements = array(); foreach ( $this->elements[ $tab ] as $key => $_element ) { $elements[ $key ] = $_element; if ( $key === $after ) { $elements[ $elementKey ] = $element; } } $this->elements[ $tab ] = $elements; } elseif( $elementKey ) { $this->elements[ $tab ][ $elementKey ] = $element; } else { $this->elements[ $tab ][] = $element; } } Specifically, this is the problematic code: if ( $key === $after ) { $elements[ $elementKey ] = $element; }Because $elementKey is NULL, the code always overwrites the same array key, and the form ends up with a single header instead of 4. === The same issue can also happen with these other functions that also pass the $elementKey always with a NULL value: addSeparator addMessage addHtml addDummy I have the same issue in a similar v4 application. If you could apply the fix to both versions, that would be great. 🙃 For now, as a temporary workaround, I'll overwrite the whole function and add the headers differently.
  4. The pages are saved in the cms_pages table. However, permissions, templates, etc. are saved in other tables. Blocks, templates, etc. might also have different IDs. I don't really recommend doing it. In my opinion, you're better off recreating all pages on the live site using the dev site to copy/paste to avoid future problems. 🙄
  5. Yeah, I'd remove it asap. Invision Community doesn't have encoded files. It's either from another software or maybe a past hacking attempt that left that file on your server. 👀
  6. The author value is properly listed in the phpDoc comment for the function, but the API documentation is not detecting it properly it seems: * @apiparam int id ID of the reaction to add * @apiparam int author ID of the member reactingI wonder if it's because the author row uses spaces instead of tabs. 🤨 So yeah, you should pass the member ID using author rather than member_id. Or if the member is logged in, that member will be used: author Required for requests made using an API Key or the Client Credentials Grant Type. For requests using an OAuth Access Token for a particular member, that member will always be the author
  7. Yeah, you haven't really posted what the issues/bugs are, so it's hard to say anything. 🙄
  8. Maybe the user is in a group that cannot react to content? Does it work if you login as that user on the site and try to react to something?
  9. Well, the IPS Marketplace was closed quite a while ago now, so I'd say it's not really "recent". 😅 Also, the developer announced ~3 months ago that they would stop any development: https://www.ynwa.tv/topic/164210-i-will-no-longer-be-working-on-developing-resources-for-invision-community-suite/ As Dawpi wrote, your best option is to hire another developer to make the changes you want. As stated in the topic I linked, I've already taken over one of his applications. 🙃
  10. teraßyte posted a post in a topic in General Questions
    I think it's by design. You can always download a copy of the image and upload it as a profile photo. It would be pointless to restrict the option on other images. 🤷‍♂️
  11. teraßyte posted a post in a topic in Feedback
    @Adriano Faria The checkLocation() function already does a hasInstance() check by itself. You can skip it. 😉
  12. Just in case, there is a tool to delete guests' content by username, but not to delete ALL guest content regardless of name: ACP > Members > CONTENT MODERATION > Spam Prevention > Delete Guest Content (button top-right)
  13. Yesterday, I could reproduce it. Today? I can't anymore. 🤷‍♂️
  14. @Marc You might be onto something. I believe there's some new JS to keep the count updated in all open tabs. When I open the notifications in a tab, the counter gets reset to 0 and hidden. However, the other tabs get updated with the value 0 without hiding the counter. When the value is 0 the JS must hide the counter.
  15. All IPS endpoints don't accept data in a JSON format: https://invisioncommunity.com/developers/rest-api Parameters For all GET requests, provide parameters in the query string. For PUT and POST requests, all parameters should be sent Form URL Encoded in the body.
  16. How are you sending the data through the API? In JSON format, perhaps? 🤔 Post the request you're using as a starting point.
  17. Just saw this again. It's probably the 8th time, but I still have no clue on how to reproduce it. 🤷‍♂️
  18. Most likely one of them is anonymous, but the count for those is missing.
  19. I've seen it a few times in the past 2-3 days, too. I was trying to find a way to reproduce it before posting a bug report. No luck yet, though.
  20. The domain is automatically set when you enter the licence key in ACP. Since you're changing domain, you first need to reset it in your client area: https://invisioncommunity.com/clientarea Click the Manage button for your license, and you should see a Change Licensed URL. If you mean the site's URL, you can change it in the conf_global.php file through FTP or a control panel's file manager. Yes, I have some already done and some almost done. I was just waiting for IPS to add some template hook points (which they recently added in 5.0.4). I'll be doing a mass release soon. If you need a specific one, send me a PM, and I can have you test it before it's released. As for Classifieds, no plans yet. There are already a couple of apps for v4, so I assumed those developers would release a v5 update.
  21. Go to this page: ACP > System > SETTINGS > License Key. There's a Change License Key button in the top-right corner of the page. Enter your new license key there.
  22. The only "correct method" is to upload the v5 files (overwriting the old v4 files) and then go to domain.com/admin/upgrade. There is no other method. The settings and applications are retained on upgrade, but you'll also need to upload new versions for all applications. The plugins were removed from v5, so those will be removed (the settings will remain in the database, but you'll need a new v5-compatible application).
  23. Guys, you're all missing the point... The Switch to Cloud page says the migration is free: https://invisioncommunity.com/services/switch-to-invision/
  24. Err, yeah. You're right. As I mentioned, I initially thought I received 6 copies of the same email and started posting it as a bug. I realized what was going on while writing but forgot to change place. 😅