Monday, October 19, 2020

Yandex New Account - Enable 'Create Organization' Option to add multiple Organizations under one account

If you have registered a new account on Yandex to connect your domain to Yandex mail, you might face an issue to add multiple organizations under one account.
You are not able to find Organization dropdown in your Admin Tools of Yandex Account. Here are the steps to active Organization dropdown in your Yandex Account.

1) Register new account on Yandex
https://connect.yandex.com > Try out > Register
or
https://passport.yandex.com/registration

2) After registration and log into new account, you can add your domain in the Domains section.

3) Once it is verified and if you want to add another domain under same account. You should add it as a different organization.

If you add under same organization, it may create issue. Best option is you can create another organization but this option may not be visible in new Yandex account.

4) To make it visible, connect.yandex.com > login > Admin Tools > Your username/image icon at top right > Add new business
https://connect.yandex.com/portal/registration?action=add&source=connect&preset=&retpath=https%3A%2F%2Fconnect.yandex.com%2Fportal%2Fhome
Click on Create an organization.

5) Now new organization will be created with new organization id which can be renamed in the profile section.
Similar way you can create as many organizations upu want and you do not need 'top left menu' option to create new organization.

Lex chatbot is not rendering html on web page

If you have integrated Lex chatbot in your website and it is showing html as a response message, it means your javascript is not able to render the html on the web page.

You need to handle this issue at the client side as it is correct method to send html as a response message from Lex.

If you are using default javascript code which you found in AWS blog for your Lex chatbot integration, you need to modify it little.

Find the following code in javascript function showResponse(lexResponse)

and replace following piece of code

	    if (lexResponse.message) {
	responsePara.appendChild(document.createTextNode(lexResponse.message));
	responsePara.appendChild(document.createElement('br'));
    }

with

    	if (lexResponse.message) {

        var message = lexResponse.message.replace(/"/g, '\'');
        responsePara.innerHTML = message;
        responsePara.appendChild(document.createElement('br'));
    }

Now you can add html markups in the message section of Lex chatbot so it will return this message when the 'Utterance' will be matched and It will render the html on the web page.

jenkins error - Failed to connect to repository : Command 'git ls-remote -h'

If you are adding a repository in 'Source Code Management' section of Jenkins and after adding correct username and password as a credentials, it is still showing 'Failed to connect to repository' error then this solution might work for you.

Solution :

check the character '@' in your username and password. I would suggest you to not use email as your git username. To remember username, people use complete email as a username. If your email is john.doe@mail.com, I would suggest you to not use 'john.doe@mail.com' as a username. You can use john.doe or if it is not available, you can use any number after it.

Similarly you should not use '@' in the password too.

After replacing '@' with other special character like '_', you should try to connect git repository from Jenkins again.