'YAML syntax error: (): did not find expected key while parsing a block mapping at line 1 column 1' while creating a GitHub issue form - github

I get the error YAML syntax error: (): did not find expected key while parsing a block mapping at line 1 column 1 while I've created another GitHub issue form.
Here is my code:
name: Bug report
description: Send a bug WinUEFI has that needs to be fixed
title: "[BUG] <title>"
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a bug that WinUEFI has! It helps me make the application better. Please be as detailed as possible so that i may consider and review the bug easier.
I ask that you search all the issues to avoid a duplicate bug. If one exists, please reply if you have anything to add to it.
Before requesting a bug, please make sure you are using the latest version and that the bug you are requesting is not already fixed in WinUEFI.
- type: textarea
id: bug-and-suggestion-relation
attributes:
label: Is your bug related to a suggestion?
description: Please give some context for this request. Why do you want it to be fixed?
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is and what needs to be fixed.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: List any alternatives you might have tried to fix the bug you want.
- type: checkboxes
id: agreements
attributes:
label: Agreements
description: Please agree to the following:
options:
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: I have ensured the bug I'm reporting isn't already fixed in the latest supported WinUEFI build.
required: true
- type: textarea
id: other
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.
EDIT: I have fixed it by correcting an another few things.
I've tried changing the name value, but it did not help.
I expected it to parse correctly and work as a template.

You have several issues going on with your YAML. First, labels: [bug] should be labels: ["but"] as that accepts a string array.
Second, you have a lot of issues with spacing. Remember that YAML is highly sensitive to spacing. Here is the working YAML of what you are looking for:
name: Bug report
description: Send a bug WinUEFI has that needs to be fixed
title: "[BUG] <title>"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a bug that WinUEFI has! It helps me make the application better. Please be as detailed as possible so that i may consider and review the bug easier.
I ask that you search all the issues to avoid a duplicate bug. If one exists, please reply if you have anything to add to it.
Before requesting a bug, please make sure you are using the latest version and that the bug you are requesting is not already fixed in WinUEFI.
- type: textarea
id: bug-and-suggestion-relation
attributes:
label: Is your bug related to a suggestion?
description: Please give some context for this request. Why do you want it to be fixed?
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is and what needs to be fixed.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: List any alternatives you might have tried to fix the bug you want.
- type: checkboxes
id: agreements
attributes:
label: Agreements
description: "Please agree to the following:"
options:
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: I have ensured the bug I'm reporting isn't already fixed in the latest supported WinUEFI build.
required: true
- type: textarea
id: other
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.

Related

Undefined local variable or method "rendering_options" error for

I am a beginner and I have used this fix (https://medium.com/#nejdetkadir/how-to-use-devise-gem-with-ruby-on-rails-7-33b89f9a9c13) for making devise work with turbo forms in my previous project and it worked fine. But when I use it in my new project it gives me an
undefined local variable or method rendering_options' for #<TurboDeviseController::Responder:0x00007f9684019cb8 #controller=#<Devise::RegistrationsController:0x0000000000bbd0>, #request=#<ActionDispatch::Request POST "http://localhost:3000/users" for ::1>, #format=:turbo_stream, #resource=#<User id: nil, email: "", created_at: nil, updated_at: nil>, #resources=[#<User id: nil, email: "", created_at: nil, updated_at: nil>], #options={}, #action=:new, #default_response=nil>
error when I sign-up without filling any fields(or passing invalid info in any of the form fields). My previous project seems to be working just fine and I have recreated this error three separate times just to be sure.
For reference here are my:
devise controller file: https://pastebin.pl/view/d275fa93
devise rb file: https://pastebin.pl/view/1b80a0bb
console output : https://pastebin.pl/view/abee4b18
screenshots of error: https://paste.pics/49220ee8d4a60bd874f539e689b32c07, https://paste.pics/286c88869865db2e996ce039a3d5eac3
I was also struggling with this exact problem when I stumbled upon this article written in Japanese: https://qiita.com/gazayas/items/0726f9ffa093e4e2d772
Changing
render rendering_options.merge(formats: :html, status: :unprocessable_entity)
to
render error_rendering_options.merge(formats: :html, status: :unprocessable_entity)
fixed the problem for me. Apparently it is caused by responders updating to 3.1.0.

Is it possible to give multiline inputs in github actions workflow_dispatch?

I have a workflow and I need to give multiline input to workflow. Something like below:
name: Test
on:
workflow_dispatch:
inputs:
change-log:
description: 'Changelog'
required: true
Here my changelog is multiline and when I am using the input it's not coming properly. Is there any way to pass multiline input correctly to a GitHub action?
At the time of writing this answer, there are no updates about this.
There was an answer on Github communinty and they mentioned that it will be added to their backlog tho.
Until then we found a couple of workarounds, either by passing the changelog as a one-line JSON string and parsing it in our workflow (something like this), or we create more inputs for our workflow_dispatch, I mean something like
name: Test
on:
workflow_dispatch:
inputs:
entry-header:
description: 'Version and date'
required: true
added:
description: List of Additions, example: '["Added foo", "Added bar"]'
required: true
default: '[]'
changed:
description: List of changes, example: '["Changed foo", "Changed bar"]'
required: true
default: '[]'
Or, if you are using workflow_call, you can create a multi-line environment variable and just pass it to your workflow (this one might be unrelated to this example/request)

Grav CMS form Integraion with Recaptcha v3

I am using Grav form v2.16.4 - i want to integrate recaptcha v3 to it but it doesn't work.
I have added the below field to it as in the documentation, please let me know if there is any issue in it?
recaptcha:
name: g-recaptcha-response
version: 2-checkbox
site_key: 6LczAsUUAAAefefwefwefe
secret_key: sfefefwefwfcaEB0fsadzKggE
type: hidden
Here is the documentation i followed -(https://learn.getgrav.org/16/forms/forms/fields-available#captcha-field),
And also i have added the recaptcha script in the head , which shows the recaptch symbol on the site now.
please help on this. i m not familiar with Grav cms.
Thank you!
Hi Here is the solution - so what i did was - i updated the Grav form to version 4, then there you could find the recaptch latest version 3 in the drop down. And after that just need to put this code to the form -
-
name: g-recaptcha-response
label: Captcha
type: captcha
recaptcha_site_key: ////////
recaptcha_not_validated: 'Captcha not valid!'
validate:
required: true
And In process
process:
-
captcha:
recaptcha_secret: ///////
-
save:
fileprefix: feedback-
dateformat: Ymd-His-u
extension: txt
This worked for me, please let me know if anyone need help on this.

How to use plugins in Extjs

I am finding it very difficult to use 'Ext.ux.TabReorderer' as a plugin in tab panel
Ext.define("practical.view.Board",{
extend: 'Ext.tab.Panel',
alias: 'widget.board',
plugins: ['Ext.ux.TabReorderer'],
items:[{
title: 'Tab 1'
},{
title: 'Tab 2'
}]
});
This was throwing an console error saying:
Cannot read property 'init' of null
Upon further investigation found that there is no folder called 'ux' in my extjs. Also a quick search showed me that there is a file named 'Ext.ux.TabReorderer.js' in 'extjs\docs\output' folder.
This is confusing me, how do I add this plugin to my tab panel ?
Edit:
After going through the link provided in the comments by DSF
I added Path in app.js
Ext.Loader.setConfig({
enabled: true,
paths: {
'Ext.ux': './app/ux'
}
});
Also changed the tab panel to include
Ext.require(['Ext.ux.TabReorderer']);
Ext.define("practical.view.Board",{...
...
It is now giving me new errors :
1) Uncaught TypeError: Ext.data.JsonP.Ext_ux_TabReorderer is not a
function (TabReorderer.js)
2) Uncaught Error: The following classes are not declared even if
their files have been loaded: 'Ext.ux.TabReorderer'. Please check the
source code of their corresponding files for possible typos:
'./app/ux/TabReorderer.js (ext-all-dev.js)
I was finally able to fix it.
I moved TabReorderer.js from extjs\docs\output folder to extjs\src\ux.
The reason this didn't work earlier was because I was providing a class name inside the plugins array.
plugins: ['Ext.ux.TabReorderer']
Where it should have been an instance of that class, as shown below
plugins: [Ext.create('Ext.ux.TabReorderer')]
Another way to add plugins would be to use a ptype. For example
plugins: [{ptype: 'cellediting'}]
One can find a list of all the ptypes in Sencha docs
Unfortunately there is no ptype for TabReorderer, so had to stick with Ext.create().
For further reading
http://www.sencha.com/blog/using-plugins-and-mixins-in-your-sencha-apps/

Unclear Mongoose error

I get the following error:
TypeError: Cannot read property 'name' of undefined
at new SchemaArray (/home/campaigns/scheduler/tests/node_modules/mongoose/lib/schema/array.js:40:22)
at Function.interpretAsType (/home/campaigns/scheduler/tests/node_modules/mongoose/lib/schema.js:201:12)
at Schema.path (/home/campaigns/scheduler/tests/node_modules/mongoose/lib/schema.js:162:29)
at Schema.add (/home/campaigns/scheduler/tests/node_modules/mongoose/lib/schema.js:110:12)
at Schema.add (/home/campaigns/scheduler/tests/node_modules/mongoose/lib/schema.js:106:14)
at new Schema (/home/campaigns/scheduler/tests/node_modules/mongoose/lib/schema.js:38:10)
at Object. (/home/campaigns/scheduler/tests/testSchedulerModel.coffee:12:21)
at Object. (/home/campaigns/scheduler/tests/testSchedulerModel.coffee:177:4)
at Module._compile (module.js:402:26)
at Object.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script.js:57:25)
However, on line 12 of testSchedulerModel.coffee there is no reference to 'name'. Here is what line 12 looks like:
ObjectId = Schema.ObjectId
So how should I understand this error?
Thank you,
Igor
Sigh. Unfortunately, while you'd think testSchedulerModel.coffee:12 would mean "line 12 of testSchedulerModel.coffee, it actually means "line 12 of the JavaScript that testSchedulerModel.coffee is compiled to. The problem is that there's currently no way to trace errors back to the original CoffeeScript (at least not under Node).
So, you'll have to compile testSchedulerModel.coffee as JS and see what line 12 is there.
Better debugging tools for CoffeeScript are coming, but for now, it's probably best that you set up a Cakefile that compiles your code to JS before running it, to avoid such confusion.
By the way, there is an open issue regarding those .coffee filenames in the stack trace: issue 987.
Trevor: Kudos for the tip!
I solved my issue. It turns out that I cannot have objects inside of arrays when defining my schema in Mongoose. I was doing it like this:
AdUnitSchema = new mongoose.Schema
venue: [
{
id: ObjectId,
name: String
}
],
geotarget: [
{
id: ObjectId,
name: String
}
]
But in actuality, I had to create separate schemas, and reference them like this:
AdUnitSchema = new mongoose.Schema
venue:
[VenueSchema]
geotarget:
[GeotargetSchema]