Jump to content

InfinityRazz

Clients
  • Posts

    76
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by InfinityRazz

  1. Thanks - I did try the previously and got the error : After changing the field to allow any uploads (not only images) I get the following : I get the above error when attempting to send the file as Base64 String or as a Byte Array.
  2. @Stuart Silvester Thanks for the quick response as always I did read over the API reference a few times but still don't fully understand what I am doing wrong here. Thanks to your suggestion - I am not no longer getting error that specific error but instead : "errorCode": "1T306\/H", "errorMessage": "UPLOAD_FIELD_IMAGE_NOT_SUPPORTED" I am not too sure what exactly is meant by "raw file contents" I've tried reading and setting the image as a Byte Array and as well as Base64String but still get the above error... My code block for reference : RestRequest restRequest = new RestRequest("/api/cms/records/" + DatabaseID.ToString() + "/" + "1"); restRequest.Method = Method.POST; restRequest.AddHeader("cache-control", "no-cache"); restRequest.AddHeader("Authorization", $"Bearer {Token.GetValue("access_token")}"); byte[] FileContent = File.ReadAllBytes("C:\\Users\\UserName\\Desktop\\Capture1.png"); var Mydate = new { SS = FileContent // Convert.ToBase64String(FileContent) }; var Image1 = JsonConvert.SerializeObject(Mydate); var png = JsonConvert.DeserializeObject<JObject>(Image1); restRequest.AddParameter("fields[276][SS]", png); var response = Client.Post(restRequest); Console.WriteLine(response.Content); Minor edit - I've tried this with both jpg and png image formats.
  3. Hey guys, currently trying to post an Image to a upload field of a database. Getting the following error : 1S306/E UPLOAD_FIELD_NOT_OBJECT Field of type Upload was supplied without being set as an object RestRequest restRequest = new RestRequest("/api/cms/records/" + DatabaseID.ToString() + "/" + "1"); restRequest.Method = Method.POST; restRequest.AddHeader("cache-control", "no-cache"); restRequest.AddHeader("Authorization", $"Bearer {Token.GetValue("access_token")}"); byte[] FileContent = File.ReadAllBytes("C:\\Users\\UserName\\Desktop\\Capture1.png"); var Mydate = new { SS = FileContent }; var Image1 = JsonConvert.SerializeObject(Mydate); var Image = JsonConvert.DeserializeObject<JObject>(Image1); restRequest.AddParameter("fields[276]", Image); var response = Client.Post(restRequest); Any suggestions would be great thanks.
  4. Our site is getting this whenever we try an API call, not errors produced in AdminCP that I can see 🤷‍♂️ Cloud hosted by ips
  5. Yea, double checked them now again I don't see anything too specific. Two recent exceptions : Type : Paypal {"name":"PAYER_ACTION_REQUIRED","message":"Transaction cannot complete successfully, instruct the buyer to return to PayPal.","information_link":"https://developer.paypal.com/docs/api/payments/v1/#error-PAYER_ACTION_REQUIRED","debug_id":"84725ec1af5b0","links":[{"href":"https://www.paypal.com/webapps/helios?action=resolve&cart_id=57688211X8349704X&payer_id=CR6XF2RU8G72U&redirect_uri=","rel":"https://uri.paypal.com/rel/resolution","method":"REDIRECT"}]} There was an error processing the payment. Please try a different payment method or contact us for assistance. Back Trace : #0 /var/www/html/106154/applications/nexus/interface/gateways/paypal.php(164): IPS\nexus\Gateway\_PayPal->api('payments/paymen...', Array) #1 {main} Type : API Operation now in progress Operation now in progress Back Trace: #0 /var/www/html/106154/system/Db/Db.php(353): IPS\_Db->_establishConnection(false) #1 /var/www/html/106154/system/Db/Db.php(484): IPS\_Db->checkConnection(false) #2 /var/www/html/106154/system/Db/Db.php(1156): IPS\_Db->preparedQuery('UPDATE `cms_cus...', Array) #3 /var/www/html/106154/system/Patterns/ActiveRecord.php(520): IPS\_Db->update('`cms_custom_dat...', '`field_141`=?', 'WHERE primary_i...') #4 /var/www/html/106154/applications/cms/sources/Records/Records.php(1916): IPS\Patterns\_ActiveRecord->save() #5 /var/www/html/106154/applications/cms/api/records.php(535): IPS\cms\_Records->save() #6 /var/www/html/106154/applications/cms/api/records.php(378): IPS\cms\api\_records->_createOrUpdate(Object(IPS\cms\Records30), 'edit') #7 /var/www/html/106154/system/Api/Controller.php(180): IPS\cms\api\_records->POSTitem(Object(IPS\cms\Databases), Object(IPS\cms\Records30)) #8 /var/www/html/106154/system/Dispatcher/Api.php(329): IPS\Api\_Controller->execute(Array, false) #9 /var/www/html/106154/api/index.php(11): IPS\Dispatcher\_Api->run() #10 {main} As for the REST API logs - I don't see anything unusual there either in-fact. All the status codes return 200 and if I try to filter by failed requests the page just loads forever and nothing is ever shown. If you need anymore info from me please just shout !
  6. Hi, I am inconstantly getting the following error while attempting to request information from a database using. /api/cms/records/{database_id} <body> <div id='error'> <h1>An error occurred <span>(500 Error)</span></h1> <div id='content'> We're sorry, but a temporary technical error has occurred which means we cannot display this site right now. <br><br> You can try again by clicking the button below, or try again later. <br><br> <button onclick="window.location.reload();" id='reload_button'>Try again</button> </div> </div> </body> I am getting errors roughly every 10 or so successful responses - Getting these errors using both a API key and OAuth. This is grinding our project to a stop at the moment so any support or suggestions would be much appreciated ! P.S - I've just updated to the latest version and I am still getting this error.
  7. While I understand that now after being with you guys for a couple years, would have saved many a headaches when starting out/for new cloud hosted users (in my opinion of course). Now when I see a topic mention editing a file I just nope on out of there 😛
  8. Just to chime in here(not support related, sorry 😞 ): -Docs of what you can/can't do (or even just a notification header in certain docs) while being hosted on invision cloud would be immensely helpful.. Wasted many a hours looking over/understanding some things, just to see that I need to edit some .PHP or something else that is unavailable to me simply because... Cloud 😅
  9. Can confirm, just ran another couple tests with 100% success rate 🙌 Y'all rock. ❤️
  10. MUCH less frequently (roughly half the amount of errors), but still occurring sadly Test 1: [12:52:21.3203662] Request 72 took 145.6567 ms with response NotFound [12:52:22.0085308] Request 73 took 188.2309 ms with response OK [12:52:22.7285995] Request 74 took 218.8197 ms with response OK [12:52:23.4217559] Request 75 took 192.9039 ms with response OK [12:52:24.1089195] Request 76 took 187.471 ms with response OK [12:52:24.8070520] Request 77 took 197.3927 ms with response OK [12:52:25.5021927] Request 78 took 194.2392 ms with response OK [12:52:26.1933441] Request 79 took 189.737 ms with response OK [12:52:26.8974590] Request 80 took 203.9373 ms with response OK [12:52:27.5985828] Request 81 took 201.2729 ms with response OK [12:52:28.3036968] Request 82 took 203.8523 ms with response OK [12:52:29.0008316] Request 83 took 196.874 ms with response OK [12:52:29.6889913] Request 84 took 188.4713 ms with response OK [12:52:30.3970966] Request 85 took 207.4205 ms with response OK [12:52:31.0922380] Request 86 took 193.813 ms with response OK [12:52:31.7963541] Request 87 took 203.6311 ms with response OK [12:52:32.4914945] Request 88 took 195.2412 ms with response OK [12:52:33.2175529] Request 89 took 224.4799 ms with response OK [12:52:33.9196752] Request 90 took 201.5613 ms with response OK [12:52:34.5669429] Request 91 took 146.6126 ms with response NotFound [12:52:35.2570961] Request 92 took 189.8837 ms with response OK [12:52:35.9522367] Request 93 took 194.5353 ms with response OK [12:52:36.6723103] Request 94 took 219.6748 ms with response OK [12:52:37.3784215] Request 95 took 206.082 ms with response OK [12:52:38.0705701] Request 96 took 190.836 ms with response OK [12:52:38.7786764] Request 97 took 208.2627 ms with response OK [12:52:39.4738162] Request 98 took 194.2146 ms with response OK [12:52:40.1749409] Request 99 took 199.9162 ms with response OK Skulltoxin had 92 successful requests and 7 failed requests. Test 2: [12:54:05.2088340] Request 75 took 147.442 ms with response NotFound [12:54:05.8860229] Request 76 took 176.2721 ms with response OK [12:54:06.5871471] Request 77 took 200.4289 ms with response OK [12:54:07.2713170] Request 78 took 183.3394 ms with response OK [12:54:07.9574831] Request 79 took 185.222 ms with response OK [12:54:08.6516247] Request 80 took 193.2557 ms with response OK [12:54:09.3218336] Request 81 took 169.2788 ms with response OK [12:54:10.0189691] Request 82 took 195.5577 ms with response OK [12:54:10.6981501] Request 83 took 179.2729 ms with response OK [12:54:11.3813227] Request 84 took 182.1876 ms with response OK [12:54:12.0814499] Request 85 took 198.574 ms with response OK [12:54:12.7636268] Request 86 took 182.5127 ms with response OK [12:54:13.4617615] Request 87 took 196.615 ms with response OK [12:54:14.1529105] Request 88 took 191.4684 ms with response OK [12:54:15.4434567] Request 89 took 789.1152 ms with response OK [12:54:16.1425869] Request 90 took 198.62 ms with response OK [12:54:16.8247614] Request 91 took 181.8209 ms with response OK [12:54:17.4999575] Request 92 took 175.098 ms with response OK [12:54:18.1402425] Request 93 took 139.0103 ms with response NotFound [12:54:18.8294011] Request 94 took 189.2065 ms with response OK [12:54:19.5075871] Request 95 took 176.7521 ms with response OK [12:54:20.1937493] Request 96 took 185.8981 ms with response OK [12:54:20.8769240] Request 97 took 182.6609 ms with response OK [12:54:21.5610939] Request 98 took 184.093 ms with response OK [12:54:22.2522428] Request 99 took 189.5306 ms with response OK Skulltoxin had 94 successful requests and 5 failed requests.
  11. Not 100% sure if this is the right place to post, but looking for an explanation as to what is happening, and why? As well as any steps I can take to mitigate these issues. Pre 4.6.10 (4.6.8 was my last update iirc) everything was working smoothly with little to no hiccups aside from us needing to add a random value to break caching requests... Post 4.6.10 update, every now an then an external rest api call just fails with no real explanation as to why aside from "Not Found" and an apparent html error 🤷‍♂️ (a json response would be nice here but.. pick and choose my battles I guess). This is breaking core functionality in some of our software... 😅 [11:48:02.9984688] Request 2 took 185.6433 ms with response OK <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> </body></html> [11:48:03.6926108] Request 3 took 194.2472 ms with response NotFound Using RestSharp ++ .NETFramework 4.8 as such: internal bool TryGetNewToken(string n, string p) { try { if (string.IsNullOrEmpty(n) || string.IsNullOrEmpty(p)) throw new Exception("Username and/or password is invalid."); var client = new RestClient("SITE_REMOVED_FOR_POST"); var request = new RestRequest("/oauth/token/"); request.AddParameter("application/x-www-form-urlencoded", $"grant_type=password" + $"&scope=mainScope" + $"&client_id={Secret}" + $"&username={n}" + $"&password={p}", ParameterType.RequestBody); var response = client.Post(request); return response.StatusCode == HttpStatusCode.OK; } catch (Exception e) { Console.WriteLine(e.Message); return false; } } internal HttpStatusCode TryGetResponse() { try { var client = new RestClient("SITE_REMOVED_FOR_POST"); var request = new RestRequest("/api/core/me"); request.AddHeader("cache-control", "no-cache"); request.AddHeader("Authorization", $"Bearer {Token.AccessToken}"); request.AddParameter("r", (DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalMilliseconds); var response = client.Get(request); return response.StatusCode; } catch (Exception e) { Console.WriteLine(e.Message); return HttpStatusCode.Unused; } } Response has pretty consistent results, showing 13-18 requests out of 100 as "NotFound", with about 20 tests performed so far with various users. [11:50:41.9183552] Request 90 took 194.2145 ms with response OK [11:50:42.6474050] Request 91 took 227.8978 ms with response OK [11:50:43.3245941] Request 92 took 176.6468 ms with response OK [11:50:43.9987912] Request 93 took 173.866 ms with response OK [11:50:44.6749822] Request 94 took 175.6907 ms with response OK [11:50:45.3262392] Request 95 took 150.9032 ms with response NotFound [11:50:46.0213815] Request 96 took 195.3285 ms with response OK [11:50:46.7145255] Request 97 took 192.2333 ms with response OK [11:50:47.4126580] Request 98 took 196.4812 ms with response OK [11:50:48.1137846] Request 99 took 201.0716 ms with response OK Xemnas had 84 successful requests and 15 failed requests. while this may not seem troubling to most.. It actually breaks functionality of the software we use with the site. The software pretty much just checks and posts to one of our DB's that has a little more in depth info we need to track the usage of users, and again was working perfectly until the recent 4.6.10 update 😞 If this isn't something I can "fix".. is there any way I can just roll back to 4.6.8 where I know everything is working as needed(Cloud hosted with invision)?
  12. Was hoping to stay away from that, but if it's my only option i may have to cave as self hosting isn't an option quite yet 😅 Would be nice if we had a way to work on plugins externally (without requiring a self hosting license). While i'm no whiz when it comes web development, it would be nice to learn/maintain things for myself, rather than relying on a dev who may or maynot still be around the next day.
  13. Yes, and I've read it pretty thoroughly and have not come across anything that mentions what I'm trying to accomplish explicitly. And because I'm being hosted on your cloud platform, developer mode is unavailable to me iirc?
  14. Any chance there's some documentation on such? Or possible to get a nudge in the right direction? Not really looking to pay someone to make a plugin/app for this, would much rather just handle it myself and learn :) Again.. using cloud community so i don't have access to "developer mode" or some of the other things mentioned at : https://invisioncommunity.com/developers/docs/general/enabling-developer-mode-r23/ for creating my own plugins. I can get around all this by just checking the database records expiration date, but that adds a couple extra requests/steps which negatively affects users with a poor connection (we're talking a matter of seconds which isn't a huge deal to me, but boy do they like to complain 🙄) This would be an amazing addition! However i "can" kind of see why this would be limited to a degree. Maybe one day :)
  15. Can only edit purchase/license custom fields via RestAPI. Doesn't let me "expire" a license in the traditional sense. 🤔
  16. Hey there, have a bit of a problem and not sure if what i want is even possible at all... Bit of info: Running the cloud community on 4.6.9. Not a whole lot of web development background, but always willing to learn. 🤷‍♂️ My goal as of now is to provide license keys via commerce, that a user would be using in an external C# application. These licenses need easy to edit, and flexible "activation" and "expiration" dates instead of what's provided with the included community renewal options. My current plan is to generate a license that does not have a renewal, 2 custom text fields (expiration date and activation date). -> User logs into app via oauth, and selects the new license, which then posts a record in a database with: - License Key - Unix timestamp of first use - Unix timestamp of when the license "should" expire, among a few other things which would then post "clean" datetimes to the license's custom fields. All the above is working splendidly via RestSharp and the RestAPI. However once a license "expires", I have no way of actually marking it as such in users purchase history and it still gets flagged if including ("active", 1); as a request parameter for user purchases. TLDR: Is it possible for me to sync a purchases expiration date with a unix timestamp saved in a database externally(aka 3rd party desktop application)? Is it possible for me to change a license from "active" to "expired" from a 3rd party desktop application? If neither of the above are possible externally, would it be possible via plugin or something on site? Manually deactivating licenses would be a royal pain in the butt.. and manually extending those licenses in event of any downtime, even more so! My idea above lets me simply get all active purchases and add X amount of seconds to each expiration date.. 🤷‍♂️ Sorry if this wasn't the right place to post this! -- Update-- And follow up, I do understand that turning on renewals will partially do what I'm seeking. However, manually editing each licenses expiration date simply isn't feasible after a certain point. ++ Me and my users are simply not a fan of renewal invoices, and would rather have a simple reminder that purchase is about to expire.
  17. Hey guys, I am attempting to request records from a DB at the follow API end point. api/cms/records/{database_id} I am making this request using a valid API key and the request returns as expected. However, I find that the first request will return in ~1100 ms and then fall down to a stead 200ms per request. Users and other applications are pushing updates to these records. However when I request the records I get an accurate return maybe once every minute, every other request returns the exact same information despite the records being updated. (Confirmed this by viewing the database page. Refreshing the page shows the updated records but the API request does not.) It might be worth pointing out that we recently just updated from 4.5.4 to 4.6.8, previously the request was working just fine. All in all I am just wondering if it is at all possible to remove the caching on my DB request, I can't find any settings along though lines 😅 and I am kind of on a dead line... So any help would go a long way. Thanks !
  18. Any eta on the update for this theme? :3 I saw you started rolling out some updates for other themes and got uber excited ❤️😉
  19. Any updates after 2 hours? My clients need to be able to connect to our site in order to use their software... Not looking forward to having to manually extend a ton of licenses ...
  20. Any info on if/when this will be coming to 4.6? or if its okay to use on 4.6? ❤️ Scared to update and break the theme.. heh 😅
  21. I'm assuming solution in the meantime would to be use some sort of external file storage, and post urls between that api and the rest api for our site? The end goal here is to have software running on a users PC that will broadcast an image of said software, and some basic data to a database where users can only see their own posts. This would allow users to keep track of the software while on the go using a "Remove Viewer" page on the site. Though this has been a tad bit of a struggle due to this issue 😅
  22. Hey guys, I've created a database with a field labeled Image & have set the field type to Upload The goal is to upload images to this field using the API : YourSite.com/api/cms/records/{database_id}/{record_id} Although I am not entirely sure how to correctly attach the file to the POST request, I've tried : Sending the base64 information of the picture through the body of the request with the key fields[67] (the same field as mentioned previously) Sending the physical file through the body as under the key fields[67] Sending both the Base64 info or just the attached file as raw binary. All of my tests have been down via Postman. Please if anyone has any suggestions on where I may find some more info, That would help a lot thanks.
  23. I feel that. The pandemic has made things crazy! O.o One more thing I noticed: "too much" text in the slider causes the title and bottom part of the text to cut off in mobile view (possibly something on my end)🤔 ** Edit** and maybe an auto scroll function for the slider? 😉 I was able to drop a JS snippet that changes the slide every 10seconds in the slider text boxes, but would be neat to see native support for it if possible 🙂 Thanks for all you do mate! Even with a bug here and there this is still one of the best looking themes we've used 😉
×
×
  • Create New...