-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error adding photo + older settings being ignored #99
Comments
@d3vcoder What a weird error! Is iCloud turned on for Scriptable? (Settings app > your name > iCloud > scroll to the Scriptable item) |
Yes iCloud is turned on. |
@d3vcoder I just discoverd the same thing at my sons mobile after performing an code update. @mzeryck already pointed into the right direction, but you not only have to activate iCloud for scriptable, but you have also to turn on iCloud Drive. But be carefull if you turn on iCloud Drive all your Script's seems to be gone, because Scriptable wants to read them from iCloud Drive now. I did not figure out how to get the the locale ones shown in scriptable with iCloud Drive on. You need to set them up new. What I did was to share them by Scriptable to the notes app and get them back after turning on iCloud drive. |
@icsAT thabks for the tip. Unfortunately my phone completely glitches out when I try to turn on iCloud Drive so I can’t test this. Another issue that just cropped up is the code no longer recognizes any changes to text size and will ignore any changes made |
@d3vcoder Thanks for bringing this up, and thanks @icsAT for your solution. In my own testing, the code worked fine with iCloud turned on or off - but since I use iCloud Drive, I didn't even think about this potential situation. Regardless, it appears the solution should work - if you Update Code, please let me know if that is correct! And, sorry for the few days away from this project. |
You guys are awesome. Thanks for the fix! Still however having the issue with text size not displaying properly. The strange thing is it will change if I modify the defaultText font size, but changing any individual items size wont have any effect. |
@d3vcoder none of the other textsizes are working? Could you name at least one item, where the textsize is not working correctly? Also it would be interesting, if you discover this only if the script runs in the widget or also if you start it from the app. |
@icsAT See attached screenshot. Changing the defaultText will change the size of everything. Changing any individual item from that list won’t do anything. |
@d3vcoder I can't see your screenshot.
That means writing and reading to preference file seems to work, else it would stay on the provided defaults. Is the script keeping your changes in the settings or are they gone if you call the the settings the next time? |
@icsAT ill try again. It keeps the settings, it just doesn’t do anything with them. My script name is Weather cal. |
@d3vcoder thanks for your information. Could you please run this script https://pastebin.com/czjFJnEW from Scriptable and post a screenshot of the output. |
@icsAT Here you go. |
@d3vcoder that helps I think. The Testscript did not found the preference file. So, maybe also the Weather Cal Script is not finding it for reading the preferences. But and this is not clear to me at the moment, it must be somewhere if it stores and shows your changes. Maybe @mzeryck has an idea on this. |
@d3vcoder This is an older version of Weather Cal (the settings are now in a UITableView rather than the script). However, the code does attempt to check for older versions. Can you please go into the Weather Cal code script, and find this section: // Determine if we're using the old or new setup.
if (typeof layout == "object") {
this.settings = layout
} else {
this.settings = this.getSettings()
this.settings.layout = layout
} And then add a single line of code after it: Can you let me know what it shows? It should display a readout of all the settings from the main script file. |
I’ll paste below the output of the log. 2020-12-23 16:26:02: {"widget":{"locale":"","units":"imperial","preview":"large","padding":5,"tintIcons":false},"layout":"\n \n row\n column(200)\n greeting\n date \n sunset\n battery\n \n column\n center\n current \n future\n \n \n space()\n \n row\n \n column\n left\n events\n \n column\n reminders\n ","localization":{"nightGreeting":"Good night.","morningGreeting":"Good morning.","afternoonGreeting":"Good afternoon.","eveningGreeting":"Good evening.","nextHourLabel":"Next hour","tomorrowLabel":"Tomorrow","noEventMessage":"No more events","durationMinute":"m","durationHour":"h","covid":"{cases} cases, {deaths} deaths, {recovered} recoveries"},"date":{"dynamicDateSize":false,"staticDateSize":"large","smallDateFormat":"EEEE, MMMM d","largeDateLineOne":"d","largeDateLineTwo":"EEEE"},"events":{"numberOfEvents":3,"minutesAfter":5,"showAllDay":true,"showTomorrow":20,"showEventLength":"duration","selectCalendars":[],"showCalendarColor":"rectangle left","noEventBehavior":"message"},"reminders":{"numberOfReminders":3,"useRelativeDueDate":false,"showWithoutDueDate":false,"showOverdue":true,"todayOnly":true,"selectLists":[],"showListColor":"rectangle left"},"sunrise":{"showWithin":0,"separateElements":false},"weather":{"showLocation":false,"horizontalCondition":true,"showCondition":false,"showHighLow":true,"showRain":true,"tomorrowShownAtHour":20,"showDays":4,"showDaysFormat":"E","showToday":false},"covid":{"country":"USA","url":"https://covid19.who.int"},"font":{"defaultText":{"size":14,"color":"ffffff","font":"regular"},"smallDate":{"size":17,"color":"","font":"semibold"},"largeDate1":{"size":50,"color":"","font":"light"},"largeDate2":{"size":20,"color":"","font":"light"},"greeting":{"size":20,"color":"","font":"light"},"eventLabel":{"size":14,"color":"","font":"semibold"},"eventTitle":{"size":14,"color":"","font":"semibold"},"eventTime":{"size":14,"color":"ffffffcc","font":""},"noEvents":{"size":15,"color":"","font":"semibold"},"largeTemp":{"size":30,"color":"","font":"light"},"smallTemp":{"size":14,"color":"","font":""},"tinyTemp":{"size":12,"color":"","font":""},"customText":{"size":14,"color":"","font":""},"battery":{"size":14,"color":"","font":"medium"},"sunrise":{"size":14,"color":"","font":"medium"},"covid":{"size":14,"color":"","font":"medium"}}} |
Although in the preferences window textSize is a string, it's passed as an integer value with the old settings format, meaning .length returns undefined.
@d3vcoder Ah, found the bug! It's fixed in the most recent version, if you delete and re-download the Weather Cal code script. |
I get this error when trying to add a new background photo. No error when adding a solid or gradient background
The text was updated successfully, but these errors were encountered: