'Add theme settings for configuration' in shopify - Error message 'unexpected token' keeps coming up? - configuration

I'm following instructions on shopify developers to create a 'How did you hear about us form field' for my website. FYI I am using safari on a Mac. Everything was working fine until I got to the step of 'Add theme settings for configuration.' In the Config. directory of settings_schema-json, the current code (below) already exists:
[
{
"name": "theme_info",
"theme_name": "Themekit template theme",
"theme_version": "1.0.0",
"theme_author": "Shopify",
"theme_documentation_url": "https:\/\/github.com\/Shopify\/themekit",
"theme_support_url": "https:\/\/github.com\/Shopify\/themekit\/issues"
}
]
I'm trying to add to that code with the code pasted below from shopify developers, which I'm told to paste on a new line below the closing curly bracket (above). But each time I do that and hit save, two error messages come up (see attached screenshot at bottom of post). The messages read 'An error prevented settings_schema.json from being saved' and 'Invalid JSON: unexpected token.' Does anybody have any idea what's going wrong here? I would be very grateful as I'm brand new to coding and this is the first time I've tried to make any changes to my website!
Thanks, Cosmo.
{
"name": "Hear About Us",
"settings": [
{
"type": "text",
"id": "hau_form_options",
"label": "Form options",
"default": "Facebook, Twitter, Google, Instagram, Youtube",
"info": "Separate each option with a comma"
},
{
"type": "header",
"content": "Form validation"
},
{
"type": "checkbox",
"id": "hau_form_validation",
"label": "Enable form validation",
"default": true
},
{
"type": "text",
"id": "hau_error_message",
"label": "Error message",
"info": "The error message that is displayed when no selection is made",
"default": "Please select an option below"
},
{
"type": "text",
"id": "hau_error_message_other",
"label": "Other field error message",
"info": "The error message that is displayed when there is no input in the 'Other' field",
"default": "Please fill the text field below"
},
{
"type": "header",
"content": "Error styling"
},
{
"type": "color",
"id": "hau_error_color",
"label": "Color",
"default": "#ff0000"
}
]
},
screenshot error message

Missing a comma ,, correct it and works fine
Update:

Related

MediaWiki template with links and inline html tag

i am trying to create a simple template that has 2 variable in Mediawiki.
variable 1 is the link whatever someone type: file://test.txt
variable 2 is the title: Test Document
The template would generate the hyperlink such as this:
TestDocument
But behind this test document link it has this wiki syntax:
<ext>file://test.txt</ext>
Could someone assist with this?
Here is the sample of wiki syntax i tried testing:
<ext>{{{1}}}|{{{2}}}</ext>
<noinclude>
<ext>{{{1}}}|{{{2}}}</ext>
<noinclude>
<templatedata>
{
"params": {
"1": {
"label": "Link",
"description": "Link",
"type": "string",
"default": "file://test.txt",
"required": true
},
"2": {
"label": "Description:",
"description": "Text",
"type": "string",
"required": true
}
},
"description": "links",
"paramOrder": [
"1",
"2"
]
}
</templatedata>
</noinclude>
If you add $wgUrlProtocols [] = 'file://'; to your LocalSettings.php, you can simply use external link syntax: [{{{1}}} {{{2}}}].

Adaptive Cards - Is it possible to enforce that the user typed something in Input Text Field before Action.Submit is allowed

I'm trying to use adaptive cards on MS Teams to capture some user input text before they click on submit. One of the things I would like to have is that I want the user to input some non-empty string before the Action.Submit is allowed to go through.
Is that an existing support feature?
Thanks!
This feature, called Input Validation, is part of the upcoming v1.3 release, which will be available in Teams in the next few months. Here is a same that uses the "required" property to indicate something must be entered.
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3",
"body": [
{
"type": "Input.Text",
"id": "name",
"placeholder": "First, last",
"label": "Please enter your name",
"isRequired": true,
"errorMessage": "Name is required"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Save"
}
]
}
You can learn about it here. https://developer.microsoft.com/en-us/office/blogs/adaptive-cards-community-call-july-2020/

Require Input.Toggle's to be Checked True Before Submitting?

I have the following adaptive card JSON code that has three Input.Toggle's. Is there a way to throw an error when the user clicks "Submit" and all three Input.Toggle's are not set to true? I saw in the Schema Explorer (Schema Explorer Input.Toggle) that they have Inherited properties called "fallback" and "requires", is that what I need? If so, how do I implement "fallback" and "requires" into this JSON code?
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"placeholder": "1.1 Business Office Coordinator - RFQ Receipt",
"type": "Input.Text",
"id": "Title"
},
{
"text": "Quote ##{body('Get_response_details')?['b194cde8837234ccc80fu5017c1b0f869']} ",
"type": "TextBlock",
"id": "textBlock1"
},
{
"type": "Input.Toggle",
"title": "Customer Acknowledgement",
"valueOn": "custYes",
"valueOff": "custNo",
"id": "Customer"
},
{
"type": "Input.Toggle",
"title": "Create RFQ Log Number and Enter Information into RFQ Log",
"valueOn": "RFQYes",
"valueOff": "RFQNo",
"id": "RFQ"
},
{
"type": "Input.Toggle",
"title": "Populate Quote Folder with Customer Data",
"valueOn": "PopulateYes",
"valueOff": "PopulateNo",
"id": "Populate"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"data": {
"id": "9876543210"
}
}
]
}
this is part of input validation which as of today is not available yet.
I'm afraid what you're asking for is not possible right now but will hopefully be soon.
You can follow the feature request here: https://portal.productboard.com/adaptivecards/1-adaptive-cards-features/c/21-input-validation-and-evolution , add your own vote to it aswell if you want to.
Depending on where you use the card however, you can get this working. In MS Teams you could verify the card submission in your own code and return an error. Its not client side but that way you can still do the check.

Hello World sample: "Something went wrong" when installing/testing

I tried to get the example from https://learn.microsoft.com/en-us/microsoftteams/platform/get-started/get-started-dotnet to run.
I successfully built and published (on Azure) the webapp.
Then I tried
- manually editing the json file in the visual studio solution similarly to what the docs said, and then import the resulting zip in App Studio
- adding the App directly in App Studio through the manifest editor (this works, but it fails when installing/testing it)
Both give me an error without any more info "something went wrong".
Any way to actually figure out what I did wrong (if anything)?
Either way, maybe you guys can figure it out from the json file's contents:
{
"$schema": "https://statics.teams.microsoft.com/sdk/v1.0/manifest/MicrosoftTeams.schema.json",
"manifestVersion": "1.0",
"version": "1.0.0",
"id": " 1CC58D17-1E95-443C-958F-E1F14D4CA3B4",
"packageName": "com.contoso.helloworld",
"developer": {
"name": "Contoso",
"websiteUrl": "https://www.microsoft.com",
"privacyUrl": "https://www.microsoft.com/privacy",
"termsOfUseUrl": "https://www.microsoft.com/termsofuse"
},
"name": {
"short": "Hello World",
"full": "Hello World App for Microsoft Teams"
},
"description": {
"short": "Hello World App for Microsoft Teams",
"full": "This sample app provides a very simple app for Microsoft Teams. You can extend this to add more content and capabilities."
},
"icons": {
"outline": "contoso20x20.png",
"color": "contoso96x96.png"
},
"accentColor": "#60A18E",
"staticTabs": [
{
"entityId": "com.contoso.helloworld.hellotab",
"name": "Hello Tab",
"contentUrl": "https://microsoftteamssampleshelloworldweb20181022032046.azurewebsites.net/hello",
"scopes": [
"personal"
]
}
],
"configurableTabs": [
{
"configurationUrl": "https://microsoftteamssampleshelloworldweb20181022032046.azurewebsites.net/configure",
"canUpdateConfiguration": true,
"scopes": [
"team"
]
}
],
"bots": [
{
"botId": "00000000-0000-0000-0000-000000000000",
"needsChannelSelector": false,
"isNotificationOnly": false,
"scopes": [
"team",
"personal"
]
}
],
"composeExtensions": [
{
"botId": "00000000-0000-0000-0000-000000000000",
"scopes": [
"personal",
"team"
],
"commands": [
{
"id": "getRandomText",
"description": "Gets some random text and images that you can insert in messages for fun.",
"title": "Get some random text for fun",
"initialRun": true,
"parameters": [
{
"name": "cardTitle",
"description": "Card title to use",
"title": "Card title"
}
]
}
]
}
],
"permissions": [],
"validDomains": []
}
Any suggestions?
There is a whitespace in your app Id in shared manifes:
"id": " 1CC58D17-1E95-443C-958F-E1F14D4CA3B4"
Could you please remove it and try and let us know if it works? Also you can remove bots and composeExtensions section if you want.
I can't comment yet (not enough reputation points) but could you go through the instructions again?
I believe something went wrong with either the GUID, or one of the URL's. The instructions also advise to use ngrok, which is usefull for debugging.
If you can't find a clear error message, i advise you follow those instructions.

Deezer api search url album cover is missing

Since two days we got a problem with the Deezer Api on this url:
http://api.deezer.com/search/autocomplete?q=Jean
In the object returned, some fields are now missing in the album object and in the base object.
The fields which usually contain the images disappeared.
{
"id": 122440564,
"readable": true,
"title": "Aloha",
"title_short": "Aloha",
"title_version": "",
"link": "http://www.deezer.com/track/122440564",
"duration": 218,
"rank": 0,
"explicit_lyrics": false,
"preview": "http://cdn-preview-9.deezer.com/stream/9f7248e8744c135d4878ae851d8bb881-4.mp3",
"artist": {
"id": 5542423,
"name": "Møme",
"link": "http://www.deezer.com/artist/5542423",
"picture": "http://api.deezer.com/artist/5542423/image",
"picture_small": "http://cdn-images.deezer.com/images/artist/6054372bc5d6dc0a2d355d5a2d55242a/56x56-000000-80-0-0.jpg",
"picture_medium": "http://cdn-images.deezer.com/images/artist/6054372bc5d6dc0a2d355d5a2d55242a/250x250-000000-80-0-0.jpg",
"picture_big": "http://cdn-images.deezer.com/images/artist/6054372bc5d6dc0a2d355d5a2d55242a/500x500-000000-80-0-0.jpg",
"picture_xl": "http://cdn-images.deezer.com/images/artist/6054372bc5d6dc0a2d355d5a2d55242a/1000x1000-000000-80-0-0.jpg",
"tracklist": "http://api.deezer.com/artist/5542423/top?limit=50",
"type": "artist"
},
"album": {
"id": 12811488,
"title": "Aloha",
"tracklist": "http://api.deezer.com/album/12811488/tracks",
"type": "album"
},
"type": "track"
},
I checked in the Deezer Api documentation, and apparently the version doesn't change, and, based on the documentation, the album object normally contain the cover album:
http://developers.deezer.com/api/search/album
Did anyone got the same issue ? I tried to tweet them and I also sent an email to api#deezer.com.
It has been fixed, we had some side effects that are now resolved.