Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,736 topics in this forum
-
- 1 follower
- 1 reply
- 577 views
Just upgraded my localdev test installs for the first time since applying a backup restoration and I'm seeing the following error: Aside from the workaround via constants, the error doesn't say what the configured temporary directory is called, so I can't check its permissions. Does anyone know which folder it is referring to? Many thanks!
Last reply by The Old Man, -
-
- 4 followers
- 17 replies
- 2.2k views
I actually posted this last night and then deleted it thinking it was fixed, but it wasn't. I've tried everything I can think of to get the PWA app icon and splash screen to display correctly, but can't seem to figure it out. Device: iPhone 13 Pro Max I've uploaded various sizes (full size, 512x512), solid background color, transparent background, etc. Each iteration I've manually deleted all S3 images generated and cleared the CF cache. I've also cleared my browser cache. I've manually checked the S3 linked images and they appear correct, however when I open my site and "Add to Home" the background of the logo is always white and the splash screen is alway…
Last reply by Marc, -
-
- 1 follower
- 0 replies
- 549 views
Hello, A brief: I have a sports tips forum where users open a topic with sports game recommendations, and at the end of the game, they manually mark Lose/win on the topic. On my forum, a custom app calculates the win/lose mark rate for each user and presents the success rate. I want to automate the mark/lose part by integrating the topics with an external aspx board. Today: 1. The user manually opens a new topic 2. The user fills in all details manually and publishes the topic. 3. The user manually marks win/lose (mark app), and the rate stat app (custom app) calculates everything automatically. --------------------------------…
Last reply by LiveG, -
-
- 2 followers
- 15 replies
- 1.2k views
In Fluid View when many filters are checked in the Filters widget, what is the URL to clear all filters (from the session) with just one click? Using /?forumId= and it works and clears all filters but it leaves that URI in the address bar. Is there a more graceful way to clear filters?
Last reply by WebCMS, -
-
- 2 followers
- 7 replies
- 949 views
Hi, I want to implement Adds only visible for special User Groups. Any tipps to implement this?
Last reply by AlexWebsites, -
-
- 2 followers
- 5 replies
- 925 views
I have just upgraded my test and live installs from Version 4.7.12 to Version 4.7.14, and I have issues with Form Text not displaying 0 values correctly. 0 seem to be treated as NULL or Empty values now. Text Form on 4.7.12 Same Form 4.7.14 There were no other changes to the code or the values (database) expect from changing from Invision 4.7.12 to 4.7.14. $form->add( new \IPS\Helpers\Form\Text( 'fixture_goals_home', $fixture->goals_home, FALSE, [], NULL, NULL, NULL, 'fixture_home_ft_score' ) ); $form->add( new \IPS\Helpers\Form\Text( 'fixture_goals_away', $fixture->goals_away, FALSE, [], NULL, NULL, NULL, 'fixture_away_ft_score'…
Last reply by TDBF, -
-
-
- 2 followers
- 2 replies
- 712 views
Just FYI, theme_cookie seems to be missing from the cookies list
Last reply by Marc, -
-
If you have something like <div data-controller="foo"> <div data-controller="bar"></div> </div> ips.controller.register("foo", { initialize: function() { ips.controller.cleanContentsOf(this.scope); } }); The controller on bar will be initialized on the dead element, and never cleaned up: ips.controller.register("bar", { initialize: function() { console.log(document.contains(this.scope[0])); // => false }, destroy: function() { console.log("destroyed"); // never called } }); This happens because ips.controller#_findControllers is called once to get all controllers to load, then the controllers are run one …
Last reply by Marc, -
-
- 1 follower
- 1 reply
- 566 views
Another behavior I've noticed is even though the REST API call executes, it is not always logged regardless of the status code (200, 201, 400, etc). Specifically I noticed this when GETing and POSTing to Pages DB.
Last reply by Daniel F, -
-
- 1 follower
- 0 replies
- 471 views
I see a "date" field available, which updates record_saved in the CMS records table. Is there any way to set the record_publish_date? It's not a field and I don't see any reference to it in the API request, so I'm assuming there is no way to set this, I'd have to manually run some SQL to do it?
Last reply by Clover13, -
For a Pages DB with many fields (that are collectively the "content"), I want to set the Content marked field as not required and clear all permissions so no one sees it. My reasoning for this setup in that the N other fields are the effective "content", not a single field. Of course something will be required, so one could just pick a random required field and mark it as the content field, however I found two issues during my testing of an "optional" Content marked field with no permissions to view/create/edit for any group. An API request to POST cms/records/{database_id} with the content field either not included or set to "" still returns TITLE_CONTENT_REQUI…
Last reply by Clover13, -
- 0 replies
- 792 views
You should add in the Changes affecting third-party developers and designers the new parameter in the \IPS\Node\Model::setLastComment(). This is breaking/locking the apps and crashing the whole board install and requires the immediate attention of the developer.
Last reply by Adriano Faria, -
Not sure if this is by design or a bug, but if you create a field as a YouTube type and click the radio button for Display options >> Display to "Under the item content", then save, it will return to "Above the item content" being selected and will continue to display as such.
Last reply by Marc, -
- 2 followers
- 4 replies
- 647 views
Troubleshooting a script to create records and running into an exception. Calling via API: POST /cms/records/{database_id} Returns: {'errorCode': '1S306/E', 'errorMessage': 'UPLOAD_FIELD_NOT_OBJECT'} Does this error apply to the image object (Record Image)? I only have one other multi-image upload field in the fields object that is optional and I'm not sending it in the POST request at all for my test, so I'm assuming this error is being returned from the image field, but want to confirm before I go down a rabbit hole. P.S. My script is written in Python, not PHP.
Last reply by Clover13, -
-
- 2 followers
- 5 replies
- 841 views
We're experiencing an issue with moderators with only file permissions granted being unable to see pending versions in the approval queue. I looked into this and there's a check in ./applications/downloads/extensions/core/ContentRouter/Files.php:49 where PendingVersion is only inserted where \IPS\downloads\File::modPermission( 'unhide', $member ) is true. However, since no container is provided, this will only return true if the user has global content unhide permission.
Last reply by Marc, -
-
- 2 followers
- 2 replies
- 913 views
Hi folks, Is there a provided method already in IPS4 to obtain the file type or extension of an uploaded image attachment resource, or do we have to do it manually in theme templates? If I know what an image file type is already because I supplied it I can use this: href="{resource="my.webp" app="core" location="front"}" type="image/webp" but if a user uploads their image, I need to set the correct image type from the resource itself. Many thanks!
Last reply by The Old Man, -
- 1 follower
- 3 replies
- 673 views
Hello, I want to create a small application to validate some invitation codes, for customers, in the registration form. But I don't know how to link the form field of my application to the registration form. If you could give me some advice or hints, I would be very grateful. Best regards and Merry Christmas to all
Last reply by bernhara, -
-
- 1 follower
- 3 replies
- 761 views
Please keep the extension's behavior consistent across all the functions. Some extensions first check if the extension implements a certain function before calling it, while others expect the function to exist at all times and throw errors if they're missing. For example, the core/ModeratorPermissions currently has 4 functions available (preSave, getPermissions, onChange, onDelete) but only preSave checks if the function is available before calling it: /* Allow extensions an opportunity to inspect the values and make adjustments */ foreach ( \IPS\Application::allExtensions( 'core', 'ModeratorPermissions', FALSE ) as $k => $ext ) { if( method_exists( $ex…
Last reply by teraßyte, -
-
- 1 follower
- 1 reply
- 827 views
Using the Form helper there's an option (the 4th one) to pass additional attributes as an array. Passing a single attribute is okay, but if you pass multiple ones the attributes are all attached with no space separating them. The fix is to edit the template "\applications\core\dev\html\admin\forms\template.phtml" on line 2: <form accept-charset='utf-8' data-formId="{$id}" action="{$action}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}} data-ipsForm class="{$formClass}" {{foreach $attributes as $k => $v}}{$k}="{$v}"{{endforeach}} {{if \count($tabArray) > 1}}novalidate="true"{{endif}}> You need to add a space inside th…
Last reply by teraßyte, -
- 1 follower
- 3 replies
- 740 views
I couldn't find anything in the docs, but I want to apply some different code in template logic for desktops, tablets and phones. We can use media queries in CSS to make styling relevant for certain device screen widths and we have ipsResponsive_showPhone etc. However, is there a utility available to do the same for HTML in IPS' template logic, perhaps a PHP expression or something? Something like: {{ is small-device/phone? }} this code {{elseif is medium-device/tablet? }} this code {{else}} use this for everything else {{endif}} Many thanks!
Last reply by The Old Man, -
- 1 follower
- 3 replies
- 730 views
Need to display different icons in my header whether someone is logged in or not. Any tips on HTML code that one could use?
Last reply by Adriano Faria, -
-
- 2 followers
- 24 replies
- 857 views
Hi, According to this help guide and an existing setting in the AdminCP https://invisioncommunity.com/4guides/themes-and-customizations/advanced-theming/managing-theme-settings-r128/ <?php return \IPS\Settings::i()->bot_antispam_type === 'recaptcha2'; This would return true for use in a conditional theme setting so that a setting will be shown or not, but when I try this using my own custom theme setting: <?php return \IPS\Theme::i()->my_theme_setting == true; it gives me an error: Error: Undefined constant "my_theme_setting" (0) #0 C:\laragon\htdocs\ips4-dev-theme3\system\Theme\Theme.php(1818): eval() #1 C:\laragon\htdocs\ips4-dev-t…
Last reply by The Old Man, -
-
-
- 2 followers
- 2 replies
- 561 views
Hi team, I think I may have found a bug in Commerce, where the cost to upgrade a package is calculated. In \IPS\nexus\Package->costToUpgrade(), at line 3334: try { $currency = $purchase->original_invoice->currency; } catch ( \Exception $e ) { $currency = $purchase->member->defaultCurrency(); } The $currency used for the calculation is either the purchase original currency, or the member default currency. But then, at line 3423, a difference is calculated: $diff = $purchase->renewals->diff( $renewalTermToUse ); And if the $currency calculated above is different from the current package currency, this difference throw…
Last reply by Marc, -
-
- 1 follower
- 1 reply
- 745 views
Just want to double check something, and happy to be wrong on this... Is there a reason why uninstalling an Invision application doesn't remove that specific application's javascript from the core_javascript table of the database? It's easy to check: Install a new instance of the full suite Check core_javascript and there's all the javascript files for all the applications. Uninstall a random application (say, Blog) Check core_javascript and there's all the javascript files still there for that specific application. Reason I am asking is that I've just spotted that an old test instance of mine where I had uninstalled all my own ap…
Last reply by Nathan Explosion, -
-
- 1 follower
- 1 reply
- 375 views
Hi team, The bug mentioned in my first post has been corrected, thank you. However, I realize that there's another bug in the same part of the code: In \IPS\nexus\Package, at line 3579: if( !$diff->invert and $diff->days > 0 ) { $purchase->expire = $purchase->start->add( $diff ); } The problem is that the above code adds the $diff difference to the purchase date, which is incorrect. Let's take an example: Today is December 7, 2023. The purchase date is November 12, 2023. The initial term is 1 month. We therefore have : $initial = new \DateInterval( "P{$newPackage->initial_term}" ) = 1 month $diff …
Last reply by Marc, -