I'm trying to build a gmail contextual gadget.
I had it working in the past but i must of changed something and it does not work now.
I have created the listing successfully and added the gadget to a test domain of mine.
But still nothing happens when i open up an email.
this is the manifest:
<?xml version="1.0" encoding="UTF-8" ?>
<ApplicationManifest xmlns="http://schemas.google.com/ApplicationManifest/2009">
<Support>
<Link rel="manage" href="http://example.com" />
<Link rel="support" href="http://example.com" />
<Link rel="deletion-policy" href="http://example.com" />
</Support>
<Name>Clarizen</Name>
<Description>Integrate with clarizen</Description>
<Extension id="navLink" type="link">
<Name>Clarizen</Name>
<Url>http://example.com</Url>
</Extension>
<!-- EXTRACTOR -->
<Extension id="Ex1" type="contextExtractor">
<Name>Ex1</Name>
<Url>google.com:EmailBodyExtractor</Url>
<Triggers ref="gadget1"/>
<Scope ref="emailBody"/>
<Container name="mail"/>
</Extension>
<!-- EXTRACTOR -->
<Extension id="Ex2" type="contextExtractor">
<Name>Ex2</Name>
<Url>google.com:SubjectExtractor</Url>
<Triggers ref="gadget1"/>
<Scope ref="emailSubject"/>
<Container name="mail"/>
</Extension>
<!-- GADGET -->
<Extension id="gadget1" type="gadget">
<Name>Clarizen contextual gadget</Name>
<Url>http://example.com:2057/test.xml</Url>
<Container name="mail"/>
<!-- Uncomment this to enable Caja. -->
<!-- <Param name="caja" value="enabled"/> -->
</Extension>
<!-- SCOPE -->
<Scope id="emailSubject">
<Url>tag:google.com,2010:auth/contextual/extractor/SUBJECT</Url>
<Reason>integaret with clarizen</Reason>
</Scope>
<Scope id="emailBody">
<Url>tag:google.com,2010:auth/contextual/extractor/BODY</Url>
<Reason>integaret with clarizen</Reason>
</Scope>
</ApplicationManifest>
I am able to load http://example.com:2057/test.xml in igoogle so i think the problem is with the manifest.
What can the problem be and how can i validate the manifest file and trouble-shoot this sort of problem.
Thanks
You can use the same gadget spec more than once. The reason it does not update is that the gadget spec (the XML file) is cached by Google.
To overcome this problem: Sign out from gmail, then sign in again. Then, in the address bar, add the parameter &nogadgetcache=1 and press enter to load the page. Then open an email message and look at your gadget.
On the same subject... if you make any changes to your Application Manifest, then the data access specs change. You should login to your Google Apps dashboard and click your app. You'll possibly see that you need to review and re-grant data access to your app because of the changes you made. And even if no warning is displayed, it does not hurt to revoke and then grant access again to make sure google updates the data access rules for your app in this domain.
finally i found out the problem - you cannot use the same gadget spec twice.
So i made a fresh copy of the gadget spec - http://example.com:2057/test_V2.xml,
and that got it working.
See http://code.google.com/apis/gmail/gadgets/contextual/ at the paragraph "Reusing a gadget spec"
Related
Trying to connect facebook login in ionic 4 application but it shows
keyhashes error happend?
change the config.xml file APP ID and APP NAME
Platform Android
<platform name="android">
<config-file parent="/resources" target="./res/values/strings.xml">
<string name="fb_app_id">xxxxxxxxxx</string>
<string name="fb_app_name">xxxxxxx</string>
</config-file>
</platform>
Platform iOS
<plugin name="cordova-plugin-facebook4" spec="^3.1.0">
<variable name="APP_ID" value="xxxxxxxxxxxxx" />
<variable name="APP_NAME" value="xxxxxxx" />
</plugin>
I'm assuming you're getting an error on login with Android and it shows a key hash? You need to add all key hashes that you see in those error messages to the setting of your Facebook app. Go to developers.facebook.com/yourappid, to settings > basic, scroll down to key hashes and add it there.
It seems that the different facebook applications on the users phone can change the hash that needs to be allowed for them. We've got 4 different hashes for ours now and I'm sure they'll be more going forward. I'd recommend setting up a logger for client errors so you can get those hashes as they pop up.
I'm trying to get Application Insights added to an existing project, which only flags the following as capabilities:
<Capability Name="ID_CAP_LOCATION" />
<Capability Name="ID_CAP_NETWORKING" />
<Capability Name="ID_CAP_PHONEDIALER" />
<Capability Name="ID_CAP_MAP" />
I've added the call in my App's constructor to:
WindowsAppInitializer.InitializeAsync();
And of course, I've checked the ApplicationInsights.config file to check the InstrumentationKey matches that shown on my portal.
Do I need to add additional capabilities to allow these to work, as I'm not seeing anything show up on the Azure Portal for the subscription, and I'm not seeing anything in the debug output to suggest that any diagnostics are being attempted to be sent?
The only required capability appears to be ID_CAP_NETWORKING.
One other thing to watch out for; when using the UI to associate with your applciation insights it will add include a schema in the applicationInsights.config file, which stops it working.
So, instead of:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationInsights>
<InstrumentationKey xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings">xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</InstrumentationKey>
</ApplicationInsights>
It should look more like:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationInsights>
<InstrumentationKey>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</InstrumentationKey>
</ApplicationInsights>
I have an MVC website (MVC 5.2.2.0), that uses ImageResizer and Azure Blob Storage, using the AzureReader2 plugin.
I am using default settings, so images will be accessed through /azure/images (where "images" is the name of my container), and it works perfectly in development - and if I deploy to an Azure Website using Debug settings.
If I deploy using Release settings, images stop working and return 404s with a times new roman text "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.", as shown below.
This is from my web.config, and is NOT modified on release (I double-checked):
<resizer>
<plugins>
<add name="MvcRoutingShim" />
<add name="AzureReader2" connectionString="DefaultEndpointsProtocol=http;AccountName=[accountname];AccountKey=[KEY]" endpoint="http://[account].blob.core.windows.net/" />
<add name="DiskCache" />
</plugins>
</resizer>
I am lost and don't know where to begin troubleshooting. I have tried disabling DiskCache plugin, which does not make any difference.
This is most likely because your configuration is enabling pre-compilation when you switch to release mode. Disabling pre-compilation should allow VirtualPathProviders to work again.
See "File Not Found - cause #4" in the Troubleshooting Guide for more information.
I have been able to define custom portlet actions/permissions based on this example in Liferay Plugins SDK
https://github.com/liferay/liferay-plugins/tree/master/portlets/sample-permissions-portlet
I want to know the necessary steps I need to take to remove the custom portlet actions/permissions (not model permissions) from a portlet.
I remember observing that when I re-deploy a portlet with modified custom actions/permissions, the old custom actions/permissions stick around.
I tried deleting the portlet folder from Tomcat's webapps and it was successfully unregistered. But after I deploy the portlet again with the custom actions/permissions removed from the corresponding XML, I can still see the permissions in the Define Permissions of a Role.
I tried clearing permissions setting in Server Administration of Liferay's control panel, but it didn't change anything (it wasn't supposed to).
After re-deploying the portlet with the removed/modified permissions and restarting the server, I still see the custom actions/permissions assigned to the portlet, but when I select the portlet, then I don't see the removed permissions which is what I need.
Does un-deploying a portlet remove all the associated custom actions/permissions from Liferay Portal and the portal's Database?
Or do I need to make separate liferay service calls to do that?
Any inputs in this regard are really appreciated.
Liferay Version: 6.1.2 CE GA3
portlet.properties
include-and-override=portlet-ext.properties
language.bundle=content.Language
resource.actions.configs=resource-actions/default.xml
resource-actions/default.xml
<?xml version="1.0"?>
<!DOCTYPE resource-action-mapping PUBLIC "-//Liferay//DTD Resource Action Mapping 6.2.0//EN" "http://www.liferay.com/dtd/liferay-resource-action-mapping_6_2_0.dtd">
<resource-action-mapping>
<portlet-resource>
<portlet-name>1</portlet-name>
<permissions>
<supports>
<action-key>ADD_SOMETHING</action-key>
<action-key>CONFIGURATION</action-key>
<action-key>VIEW</action-key>
</supports>
<site-member-defaults>
<action-key>VIEW</action-key>
</site-member-defaults>
<guest-defaults>
<action-key>VIEW</action-key>
</guest-defaults>
<guest-unsupported />
</permissions>
</portlet-resource>
</resource-action-mapping>
content/language.properties
action.ADD_SOMETHING=Add Something
portlet.xml
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
<portlet>
<portlet-name>1</portlet-name>
<display-name>Sample Permissions</display-name>
<portlet-class>com.liferay.util.bridges.mvc.MVCPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/view.jsp</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<resource-bundle>content.Language</resource-bundle>
<portlet-info>
<title>Sample Permissions</title>
<short-title>Sample Permissions</short-title>
<keywords>Sample Permissions</keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
</portlet-app>
liferay-portlet.xml
<liferay-portlet-app>
<portlet>
<portlet-name>1</portlet-name>
<instanceable>true</instanceable>
</portlet>
<role-mapper>
<role-name>administrator</role-name>
<role-link>Administrator</role-link>
</role-mapper>
<role-mapper>
<role-name>guest</role-name>
<role-link>Guest</role-link>
</role-mapper>
<role-mapper>
<role-name>power-user</role-name>
<role-link>Power User</role-link>
</role-mapper>
<role-mapper>
<role-name>user</role-name>
<role-link>User</role-link>
</role-mapper>
</liferay-portlet-app>
liferay-display.xml
<?xml version="1.0"?>
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.2.0//EN" "http://www.liferay.com/dtd/liferay-display_6_2_0.dtd">
<display>
<category name="category.sample">
<portlet id="1" />
</category>
</display>
liferay-plugin-package.properties
name=Sample Permissions
module-group-id=liferay
module-incremental-version=1
tags=sample
short-description=This plugin shows how to use the permission service from a portlet.
long-description=
change-log=
page-url=http://www.liferay.com
author=Liferay, Inc.
licenses=LGPL
liferay-versions=6.2.0+
portal-dependency-jars=\
jstl-api.jar,\
jstl-impl.jar
portal-dependency-tlds=\
c.tld
web.xml
<?xml version="1.0"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>
The above code works perfectly and I am able to see the permissions in Define Permissions for role.
What I am looking for is, if I modify ADD_SOMETHING action to ADD_SOMETHING_ELSE or
Remove ADD_SOMETHING action and add a new action key MY_NEW_ACTION,
would the ADD_SOMETHING permission be removed completely from the portal? And if not what are the steps that I need to take to remove the ADD_SOMETHING permission?
Redeploy and Restart the server is enough to ensure these actions?
EDIT:
Based on Prakash's Response
//Ashok - Beanshell Script for ResourceAction Table Service
import com.liferay.portal.model.ResourceAction;
import com.liferay.portal.service.ResourceActionLocalServiceUtil;
import java.util.List;
List resourceList=ResourceActionLocalServiceUtil.getResourceActions(com.liferay.portal.kernel.dao.orm.QueryUtil.ALL_POS, com.liferay.portal.kernel.dao.orm.QueryUtil.ALL_POS);
for (ResourceAction resourceAction:resourceList) {
System.out.println("Resource Name: " + resourceAction.getActionId());
System.out.println("Resource Name: " + resourceAction.getName());
//ResourceActionLocalServiceUtil.deleteResourceAction(giveActionIdHereForDeleting);
}
Permissions are not removed from database for the portlet either when you un-deploy the portlet, or when you restart the server. why?
Because, undeploying a portlet does not necessarily mean the data needs to be removed from the database, the portlet can be redeployed many times. So liferay correctly takes the safe route of keeping the data intact unless it is manually deleted through the database or through some service. And the permissions are considered as data just like you have data stored for your custom asset.
So you can delete the permissions from ResourceAction table by creating some service or through the beanshell scripting panel in control Panel → Server Administration → Scripting → Select Beanshell. You would also need to take care of the bitwiseValue and the permissions already set in the ResourcePermission table.
I would suggest renaming the permission in the ResourceAction table rather than deleting and adding new, it might get complicated.
Hope this helps.
I am trying to configure an email publisher to send email upon failure to the user[s] that contributed to a failed build. If that's not possible because it's a list, then perhaps I can configure tasks that do a forced build, in which case I could use ${CCNetUser}.
This is my attempt at configuring it because I could not find anything helpful other than the LDAP Email Converter page in the cc.net documentation.
<converters>
<ldapConverter domainName="xxxxxx.com" />
<!--not sure if needed: ldapLogOnUser="LdapQuery" ldapLogOnPassword="****"-->
</converters>
<users>
<cb:define userEmail="${CCNetModifyingUsers}" />
<user name="buildmaster" group="buildmaster" address="$(userEmail)" />
</users>
Any suggestions would be greatly appreciated.
I finally figured this out.
The solution, which was not clear from the documentation, was to use this type of user node:
<user name="${CCNetFailureUsers}" group="failure" address="" />
The user name uses the dynamic variable that resolves to the list of users that contributed to the failed build, the group defines notification for Failed builds (and exceptions in my configuration) and a blank address is what triggers the ldapConverter.