Drupal 9 adding a reCAPTCHA element to a webform
JSON structure
Outlining the structure of the elements common attributes: type, title, name and required;
Text area
{
"type": "webform_multiple",
"title": "What's new?",
"name": "what_s_new_",
"required": false
}
Text field
An additional attribute for the text field is maxlength
Decoupled Drupal 9 with React front-end using search
How to make React calls on a Drupal 9 backend site using the search functionality
Tools
Drupal | 9.4 |
React |
The sample sent through from the front-end is as follows:
Adding icon and type elements to the JSON output for React frontend
Working on a decoupled React / Drupal 9 site.
Aim: Adjust the output of curated content for the Work Resources page. So the icon is displayed with a path. Enabling React developers to select whether to use the image or icon.
Tools
Drupal | 9.4 |
React |
How to get the node.nid from the alias
In this instance, I'll check the beginning of the string. I want to focus on the href's that start with /node/. Which has been added using the variable $catchPhrase.
Using the Drupal service path_alias to return the node.nid as follows:
Microsoft Teams - not opening on MACOS - how to delete cache of Microsoft Teams on macOS?
Trying to have a chat recently, and Microsoft Teams would not open on MAC OS. Sometimes it would open without issue. But today, no play.
The email comes through with no issue. Opens in Safari with no issue. But the link to open in Microsoft Teams, goes nowhere.
Below are the progressive steps that I took to resolve this issue (note that this could take multiple solutions - let's see):
ERROR Error: Uncaught (in promise): TypeError: undefined is not an object
ERROR Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating 'ce.imageURL')
git fatal: The current branch {} has no upstream branch
When attempting to do a git push, are you getting the following response:
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin main
Quick solution, instead run the command
git push origin main
And the response will push what you were attempting to do
Recently viewed pages
This code is from Drupal 9 back-end for a React front-end via REST API.
Working through the output for recently viewed pages... the code structure:
How to remove .DS_Store from your git repo
Working from the bases that .DS_Store has not been added to your git repository, then you can add it to your .gitignore file.
touch .gitignore
In the .gitignore file add the following
# Hide the DS_Store files
**/.DS_Store
However, if it's already there, then in Terminal you will need to write:
OSX : Convert a putty .ppk key to a .pem file
How do you generate a .pem file from an existing .ppk key?
Is putty on your mac?
Check by running the command
puttygen -V
Which will generate a response similar to
puttygen: Release 0.76
Build platform: 64-bit Unix
Compiler: clang 12.0.5 (clang-1205.0.22.9)
Source commit: 1fd7baa7344bb....
Don't have Putty, well easily fixed with homebrew.