Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,734 topics in this forum
-
- 1 follower
- 1 reply
- 492 views
I am getting a warning above (IN_DEV) in applications/cms/sources/Categories/Categories.php line 1615 foreach( $this->children() as $child ) { $childLastPost = $child->lastPost(); if( !$result OR $childLastPost['date'] > $result['date'] ) { $result = $childLastPost; } } You do not check if $childLastPost is NULL, before trying to get $childLastPost['date'].
Last reply by Daniel F, -
- 2 followers
- 9 replies
- 945 views
Sometimes I have to use use mathematical operators within template tags in templates, e.g. {{ … > … ;}} But this kills the HTML styling for parts of the template or even the rest of the template, making it hard to navigate the document, spot errors and it also kills the automatic code indentation. Is there any way around that?
Last reply by Runar, -
- 1 follower
- 0 replies
- 491 views
As per title. I was sure there was a core extension to add new tabs in the Account Settings page but it looks like I was wrong. I've seen several apps adding new options there and it just seems a good place to have one really. It would make things easier instead of having to go around it adding hooks.
Last reply by teraßyte, -
- 1 follower
- 0 replies
- 327 views
4.6.10 Beta 2. I can add new blocks on the page*. But I cannot remove them. I open Block Manager and remove them. After refreshing the page, the blocks are still there. I have to remove them several times till they are really removed. *Additionally, when I use: {{\IPS\Output::i()->sidebar['enabled'] = FALSE;}} in page template, I am unable to add any block to the header or footer area of this page. The blocks are there and visible, till I close Block Manager. Then they disappear. Probably related to this
Last reply by Sonya*, -
- 1 reply
- 303 views
If you keep selecting the Manage Club option Reorder Menu it keeps adding the reorder icon in the menu without checking if one is already present: The menu option should be disabled after it's clicked until the save button is used. Or just check if the icon is there in the JS before re-adding it? More of a nitpick than a bug really, but I casually stumbled upon it. 😋
Last reply by Daniel F, -
- 4 replies
- 621 views
Trying to use the "Topic Summary" cached content in an application, and hitting a brick wall. So, here goes again (tried already in the Slack channel) Do the following: Create a new PHP file in your IPS install root, add the code below and save it. Create a new topic, add an image attachment, submit the topic Open your PHP file in a browser. Q: why does the image information for the most recent topic (the one you created) get reproduced for all other topics, regardless of whether those other topics have no images or have images of their own? Important: it's going to return ALL topics so feel free to finesse the query to just a single…
Last reply by Nathan Explosion, -
- 1 follower
- 0 replies
- 315 views
I'm not sure if this has been reported or not, so forgive me if this is the case already. I seemed to have come across an issue with the Helpers\Form\Members class. Example: $form->add( new \IPS\Helpers\Form\Member( 'member_id', \IPS\Member::load( $member->member_id ), TRUE, [], NULL, NULL, NULL, 'member_id' ) ); Any form using this form element ill lose its value/s after you refresh the page the form is on. All other elements display correctly after a page refresh. Can anyone else confirm?
Last reply by TDBF, -
- 1 follower
- 1 reply
- 472 views
This code … $recordClass::getItemsWithPermission( array(array('category_id=?',$record->container()->id), … Results in “Column 'category_id' in where clause is ambiguous” in developer mode. How can I make the call unambiguous? I haven’t found anything about using aliases in such a call with getItemsWithPermission and prepared statements. (Manually adding the column name works of course, but I am not sure that’s the cleanest and recommended solution.)
Last reply by Martin A., -
- 1 follower
- 1 reply
- 770 views
In CMS Templates, when I try to create a new group for JS Files I get the error: This template group already exists. The template group does not exist, though. At least not in JS files. There is indeed a template group with the same name in CSS files. In applications/cms/modules/admin/pages/templates.php line 615 you check if the group exists without checking template_location: $form->add( new \IPS\Helpers\Form\Text( 'template_group_new', NULL, FALSE, array( 'regex' => '/^([a-z_][a-z0-9_]+?)?$/' ), function( $val ) { try { $count = \IPS\Db::i()->select( 'COUNT(*)', 'cms_templates', array( "LOWER(template_group)=?", mb_strtolower( str_re…
Last reply by Daniel F, -
- 2 replies
- 765 views
Hello, I understand that I need to renew my subscription to receive IPB updates or to continue enjoying some IPB privileges. But if I am happy with the current IPB version and want to continue without updating, then you should allow it. I'm Self-Hosted IPB user. However, if I do not extend my ipb subscription, I cannot access the support community, use downloads, use commerce, cannot purchase new plugins, and most importantly, cannot download and use plugins that I have already purchased. I am still an IPB user. I bought it and currently don't need IPB updates. However, I can not access to add-ons that I have purchased in the market area. Or I am restricted…
Last reply by HakanYagiz, -
- 3 followers
- 12 replies
- 1.3k views
Please advise which timezone IPS uses for task scheduler? Server US local client based on admin logins How to instruct "strictly" to use certain country time zone?
Last reply by Randy Calvert, -
- 3 followers
- 2 replies
- 959 views
I am doing some automated posts to a forum via the API and the body is going to be an iframe is there a way to have the height of the iframe adjust automatically to the source?
Last reply by Jimi Wikman, -
- 1 follower
- 1 reply
- 433 views
Is there an issue with changing FURL in custom apps? Here is an example of what I'm trying to do to But it keeps on adding the top level furl app name for me after saving My furl.json file for reference. { "topLevel": "collections", "pages": { "collections_add": { "friendly": "add", "real": "app=collections&module=collections&controller=submit" }, "collections": { "friendly": "", "real": "app=collections&module=collections&controller=index" } } }
Last reply by Adriano Faria, -
- 1 follower
- 0 replies
- 392 views
I have the New Status Updates widget active in the center column above the activity timeline. If you use it to create a status update, a few seconds after you hit the submit button, a blue button appears at the top of the timeline saying "new content has been posted, click to show" (or something to that effect). Here's where the bug starts. If you click that button, it will reveal the status update you just made, BUT it will also open up the editor again in the new status updates widget at the top of the page. And the editor will contain the text from the status update you just made. This bug has existed for years, I apologize for only reporting it now. But with the way I…
Last reply by Aramaech, -
- 2 followers
- 1 reply
- 690 views
I have created a new bulk mail with following selection: And get this SQL error upon saving: SELECT DISTINCT COUNT(DISTINCT core_members.member_id) FROM `core_members` LEFT JOIN `core_pfields_content` ON core_members.member_id=core_pfields_content.member_id WHERE core_members.allow_admin_mails=1 AND core_members.temp_ban=0 AND core_members.email!='' AND ( ! (`members_bitoptions` & 1 ) != 0 ) AND (`members_bitoptions` & ~1 ) != 0 AND ( v.lost_pass=0 AND v.forgot_security=0 AND v.vid IS NOT NULL ) AND (temp_ban IS NULL OR temp_ban=0) AND ( (failed_login_count IS NULL OR failed_login_count=0) and (failed_mfa_attempts IS NULL OR failed_mfa_…
Last reply by Stuart Silvester, -
- 2 followers
- 1 reply
- 597 views
And then the filter for banned users on the same screen:
Last reply by Stuart Silvester, -
- 1 follower
- 1 reply
- 696 views
Vertical or horizontal view of the block is not considered when cached https://invisioncommunity.com/forums/topic/464685-two-custom-blocks-vertical-and-horizontal/ Can you please add an orientation to the block cache? This would help to avoid creating identical blocks just for different positions.
Last reply by Stuart Silvester, -
- 1 follower
- 1 reply
- 556 views
Not sure this is a bug; will post it anyway. I added a Codemirror field on my form but it doesn't show the "description" of each option. You can reproduce it in Nexus -> Products -> Custom Fields -> Email content for after purchase. $form->add( new \IPS\Helpers\Form\Codemirror( "p_email_{$k}_html", $this->$valueKey, FALSE, array( 'preview' => \IPS\Http\Url::internal('app=nexus&module=store&controller=packages&do=emailPreview')->csrf(), 'tags' => array( '{$purchase->name}' => \IPS\Member::loggedIn()->language()->addToStack('ps_name'), '{$purchase->expires}' => \IPS\Member::loggedIn()->…
Last reply by Stuart Silvester, -
- 1 follower
- 2 replies
- 749 views
I need to run a query that produces a list of members and their postal addresses. When I look at the nexus_customer_addresses, the address column is formatted like this: {"lat":null,"long":null,"addressLines":["17 N. State Street 19th Floor"],"city":"Chicago","region":"Illinois","country":"US","postalCode":60602} How can I extract the pieces of information, such as address, city, state,and zipcode, and put them into separate columns when I run my query?
Last reply by DolSch, -
- 1 follower
- 1 reply
- 789 views
In ACP, E-Mail statistics
Last reply by Daniel F, -
- 5 replies
- 868 views
Please, update the DEV FILES for IPS 4.6.7.
Last reply by Daniel F, -
- 1 follower
- 1 reply
- 514 views
Hello! Please tell me if I can make a multilingual version when creating an application dev/lang.php and if so, where can I see an example of such a file? So far, all the examples I've seen contain language strings in only one language. Thanks. Julia
Last reply by Stuart Silvester, -
- 1 follower
- 3 replies
- 774 views
Hello. I think, I found a bug in Commerce. Example: 1 product (physical package) with 2 options: yellow colour and blue color. In "Stock & price Adjustments" I choose option "Use different stock levels and prices depending on custom field values" and set quantities: 10 for yellow, and 10 for blue. At main page of Commerce I see "In stock" for this product. Ok. Now set quanity for yellow = 0. At main page - still "In stock". Ok And now set quantity of blue = 0. At main page I want to see "Out of stock". But I still see "In stock" I correct this in my store by theme hook for \IPS\Theme\class_nexus_front_store in "…
Last reply by Stuart Silvester, -
- 1 follower
- 2 replies
- 642 views
A lazy ask since I haven't done enough research yet. My community is acting as IDP. My custom web-application, henceforth PoCApp, successfully navigates the OAuth flow to authenticate the user against Invision. Now PoCApp makes API calls to PoCAPI. PoCAPI is separate from Invision. PoCAPI should leverage the bearer token to authenticate and authorize the user for the API call. Is there a standard approach for PoCAPI to communicate with Invision to validate the authentication? I'm suspecting I need to write an addon API (introspection endpoint) to Invision that PoCAPI will call to do the validation but am curious if there is something hiding or some overloadin…
Last reply by HarpGamer, -
- 1 follower
- 1 reply
- 664 views
On PHP 8 the opacity option for the HexToRGB plugin is failing: if ( isset( \IPS\Theme::i()->settings[ $opacity ] ) ) { $opacity = \IPS\Theme::i()->settings[ $opacity ]; } /* If a regular setting key has been passed in, then use that as the opacity */ if ( isset( \IPS\Settings::i()->$opacity ) ) { $opacity = \IPS\Settings::i()->$opacity; } If you pass through a standard setting (not theme setting), on the theme setting check you'll get crashes with an undeclared constant: Undefined constant "IPS\Theme\my_transparency_setting" This may, or may not, have been happening IN_DEV for years, but it's now in production on PHP 8 as well…
Last reply by Stuart Silvester,