WSO2 5.3.0 Email template is not updating - wso2-api-manager

I am using WSO2IS 5.3.0 version.
I updated all the configs but mistakenly i gave wrong password reset url in [IS_HOME]/repository/conf/email/email-admin-config.xml file. I started my server with RDBMS as datasource. Everything worked well.
Then I noticed my password reset url is wrong. Again I went to [IS_HOME]/repository/conf/email/email-admin-config.xml file and updated the url and restarted WSO2. But it is not working for all the users. Some users still getting old template with wrong url. I restarted my WSO2 multiple times and updated the xml file but no luck. I even tried to change the template through carbon admin UI but still it is sending wrong template.
The weird thing is it is sending right one immediately after i restart WSO2 but after sometimes it start using old template. How can I solve this issue without reconfigure everything from beginning?

Let's me explain how the email-admin-config.xml works. This file works as the bootstrap data required to populate email templates in WSO2 Identity Server. So whenever you create a tenant initial data related to email templates will be read from here.
So we basically read the file during the first startup (ie. creation of carbon.super tenant) and any new tenant creation of the server and write the content to the database. Thereafter any change you want to do needs to be done with the UI provided in the Managment Console.
Restarting the server won't make the changes apply to existing tenants that were created before changes were made to email-admin-config.xml. But if you create a new tenant the updated content will be read from the email-admin-config.xml.
Hope this clarifies your concerns.

Adding to #farasath's answer. You can also use a SOAP service to change the template programmatically. For that, you can use AccountCredentialMgtConfigService. The service contract can be accessed from.
https://<host>:<port>/services/AccountCredentialMgtConfigService?wsdl
However to access the WSDL, you have to set HideAdminServices property to false first at <IS_HOME>/repository/conf/carbon.xml and restart the server.
Also, in the management console, the email template management UI can be found under Manage section on the left side panel.

Related

Firebase database empty tab, rules load indefinitely

I just created a firebase project. And the database in the console appears empty. On previous projects, when you clicked on the empty white area, you were able to create database items by hand.
But clicking it doesn't do anything.
The rules tab is loading indefinitely, and i can't type anything.
I'm on Chrome last version, do you encounter such problems by creating new projects?
Here are some screenshots:
Ok, quick answer to my own question as i wasn't able, from my Angular2 App, to interact with database as well via websocket.
I'm working in a company with a (strong) proxy setup file. Disabled it on windows settings and all works now perfectly. Firebase website appears to rely on websockets.
Hope this information can be useful to someone else!

How do I make a programatically changed site dashboard refresh without restarting the Alfresco/Tomcat service?

I've created a web-script module extension and have verified that it works correctly. What it does is takes the dashboard.xml and related page.component-X-Y.type~id~dashboard.xml files from one site, deletes all dashboard related files on another site then copies the source files to the new site that had them deleted.
pseudo-code
var siteDashboard = getDashboard("site1-shortname");
var siteDashboard = renameShortNames("site1-shortname", "short2-shortname");
deleteDashboard("site2-shortname");
createDashboard("site2-shortname", siteDashboard);
renameShortNames just renames the site id inside the dashboard files to the new site's id.
This all works, I've tested and verified it. My problem is that when I go to http://alfrescosite.com/alfresco/s/remoteadm/get/s/sitestore/alfresco/site-data/pages/site/site2-shortname/dashboard.xml it shows me the new dashboard layout from site1-shortname which is the correct behavior but when I go to the actual site's dashboard within Alfresco share it shows the old site2-shortname dashboard. The only way I can get the new dashboard to show is by restarting the Alfresco/Tomcat service. I've even tried looking at the dashboard with a different browser just in case it was a local caching issue but it's not.
Any ideas on how to make the dashboards refresh to the new layout without having to restart the Alfresco/Tomcat service every time?
I figured out what the problem was. The problem was that I was deleting and recreating the dashboard via Remote API calls to the Alfresco Repository and doing it that way was making the appropriate changes but not telling Alfresco Share of those changes.
The solution was to use a combination the Share root object sitedata to remove the component bindings, delete the components and recreate them through Share so that the changes are automatically updated on the front end without the need for a service restart.
Basically this ended up being a modified version of the code in customise-dashboard.post.json.js inside Alfresco Share

plone add-on collective.sendaspdf: login required for downloading page

I'm using collective.sendaspdf for pdf download of plone pages, but it asks users to login whene they download a public content.
This appears strange as it happens just in the production server, not in the development server (the only difference seems that the latter is started in foreground mode).
Of course I can't assign particular permissions on objects to anonymous users, so I guess the problem is somewhere else
thanks to Jean's suggestion, i enabled the verbose security and the error is "Unauthorized: You are not allowed to access '##at_base_edit_view' in this context"
This looks strange to me as the page is the view of my content-type archetype-based, and it is published so it is visible to anonymous users. I repeat also that I have the development server with the same software installed where the authorization is correctly given, i.e. the page can be downloaded by anyone without login...what changes is the network configuration (I have an apache that performs some url rewriting in front of my zope server, but this just affects the path of the plone site to be hidden)
I wonder if I can manage to correct this just through the sendaspdf configuration. I don't know which additional info I could provide about the environment/configuration. I'm running Plone 4.0.4 + collective.sendaspdf 2.0
Ok, the problem was due to a bug in how collective.sendaspdf handles archetype-based content types, it's possible to workaround it by replacing the code:
view_name = context_type.getProperty('immediate_view')
with
view_name = context_type.getProperty('default_view')
in the method get_page_source of base.py, or by waiting the next release of the product.

vTiger doesn't recognize any user

I having a problem using vTiger.
Actually i had no problems but we had to format one of our servers and as the SQL has been backup'ed i had no worries about vTiger.
Just got vTiger folder backup'ed too, but when i had my server back and put the folder of vTiger into www and restored the database i had a few errors, mostly resolved by re-configuring config.inc.php because paths had changes. But after all the configuration is done again i can't login to my vTiger. He reachs the database but does not recognize any of the users. I alway get username or password is wrong. Have anyone experienced this? Is there any possible solution?
Had a similar problem a few days ago, it turns out my cookies were corrupt (Firefox). I cleared all related cookies, problem solved. Try first using some other browser to confirm. hth.
First I would check if the db is reached and populated with your data. Try connecting from the command line.
If you are working on Windows and have changed Vtiger's path, and you are using the bundled version, MySql path changes as well, but the Windows service can still be alive on the old path: in this case you must manually cancel the service and afterwards use the "Start Vtiger" button in order to create the new service.
Second, I would turn on the php debugging as explained here. In most cases, these steps should help you.
Have you checked user_privileges folder? in that you must have 2 files for particular user. eg. your user admin having id 1 in database then you must have user_privileges/sharing_privileges_1.php and user_privileges/user_privileges_1.php file
and open user_privileges_1.php file and check username/password in that file, if it's not same with your DB then change it manually.
Try this solution and let me know if it works.

Creating DNN Portal through Code (or programming)?

I have one portal with 3 modules inside it, now my requirement is i would like to create
new portal for every client registered in my DNN site.
So, i have one interface for registration, so as soon as client registers entirely new parent portal should be created with all the modules.
How can i achieve this functionality ???
I would suggest digging into the admin files that come as part of the default DNN installation and look for the code that creates a new portal from there. It will ultimately be calling a stored procedure to create the necessary data in the SQL tables. You might get away with just calling the stored procs but the admin code probably calls several different ones to setup the default security settings.
Curiously what alias will each of these portals use? It's not clear why you need a complete portal for each user. The DNN segmentation already allows you to show different content based on role membership. Why the need for a whole portal per user?
Use the site wizard to create template of the current portal and during client registration programmatically execute the template. You may also want to automate the site setup in IIS.
Well, You can easily do it! Login to host and go to portals. Click on create new protal.
See which control is responsible for creating new portal. you can simaply get it by using firebug and look into client id of link or text box.
Once you do that, you will find the code you can use.
tell me if you need more help with it, I'm good with what you want to do!

Resources