Assistance with Open Source adoption

Open Source News

Outlook 365 CiviCRM Plugin - Looking for funding

CiviCRM - Thu, 02/15/2018 - 04:03

Last month I made a proposal for a client to integrate CiviCRM with Outlook 365. This proposal was rejected because the client did not go for an e-mail migration to Outlook 365. So the need for this plugin was gone.

The plan was that this integration would do the following:

Categories: CRM

CiviNYC 2018 Kickoff at Columbia University

CiviCRM - Wed, 02/14/2018 - 13:28

After many many many months, we had another CiviNYC day last week at Columbia University, thanks to Bashar Makhay (@themak) of the Office of Government and Community Affairs.

Categories: CRM

Dries Buytaert Shares His View on Decoupled Drupal: When, Why, and How

Drupal - Wed, 02/14/2018 - 13:24

More and more developers are choosing content-as-a-service solutions known as decoupled CMSes, and due to this trend, people are asking whether decoupled CMSes are challenging the market for traditional CMSes.

By nature, decoupled CMSes lack end-user front ends, provide few to no editorial tools for display and layout, and as such leave presentational concerns almost entirely up to the front-end developer. Luckily, Drupal has one crucial advantage that propels it beyond these concerns of emerging decoupled competitors.

Join Dries Buytaert, founder of Drupal and CTO at Acquia, as he shares his knowledge on how Drupal has an advantage over competitors, and discusses his point-of-view on why, when, and how you should implement decoupled Drupal.

Dries will touch on:

  • His thoughts on decoupled CMSes - where is the CMS market headed and when?
  • His opinion on whether decoupled CMSes will replace traditional CMSes
  • The advantages of decoupled Drupal vs. emerging decoupled competitors
  • Considerations when determining if decoupled Drupal is right for your project

Click here to watch the webinar. Dries Buytaert


Dries Buytaert is an open source developer and technology executive. He is the original creator and project lead for Drupal, an open source platform for building websites and digital experiences. Buytaert is also co-founder and chief technology officer of Acquia, a venture-backed technology company. Acquia provides an open cloud platform to many large organizations, which helps them build, deliver and optimize digital experiences. A Young Global Leader at the World Economic Forum, he holds a PhD in computer science and engineering from Ghent University and a Licentiate Computer Science (MsC) from the University of Antwerp. He was named CTO of the Year by the Massachusetts Technology Leadership Council, New England Entrepreneur of the Year by Ernst & Young, and a Young Innovator by MIT Technology Review. He blogs frequently on Drupalopen sourcestartupsbusiness, and the future at



Categories: CMS

OSI Joins UNESCO to Grow Open Source Community

Open Source Initiative - Wed, 02/14/2018 - 08:36

Participate in the #OpenTechNights Program today and Win a Free Stay during the FOSSASIA Summit 2018 from the Open Source Initiative and UNESCO

The FOSSASIA Summit 2018 takes place in Singapore from Thursday, March 22 – Sunday, March 25. Open Source contributors can now apply for a free ticket to the event, and accommodation throughout conference. In addition, you’ll be eligible to participate in: A featured workshops, the UNESCO hackathon, and celebrate the 20th Anniversary of the Open Source Initiative. All you have to do is convince us, that you are an awesome Open Source contributor and book your trip to Singapore!

About #OpenTechNights

Developers from all over the world are joining the FOSSASIA Summit. We want to connect established and new Open Tech contributors alike. With the support of UNESCO, the Open Source Initiative, and other partners, we are inviting Free and Open Source Software contributors to join us. Winners will receive free lodging at a shared accommodation in the centre of Singapore, and a free ticket to the conference.

Winners are expected to join the summit each day, to participate in the workshops, and the Hackathon on Saturday/Sunday, March 24/25. We would also hope you can support the Open Source Initiative at their booth.

How do I sign up?

Step 1: Please fill in our form here before February 28, 2018.

Step 2: We will notify all winners within three days of their submission, however judging will begin immediately, and continue until all open spots are filled, so the earlier you apply, the higher your chances to win. Please note, winners will receive free accommodations in the Singapore. Flight and other travel costs are not included and are the responsibility of the attendee.

Step 3: Selected applicants must confirm their itinerary and tickets before March 1st to insure their free stay in Singapore. Earliest check-in possible is Wednesday March 21, latest check-out is Monday, March 26. Please indicate your arrival and departure times in the application form.

Expectations of Participants – Share what you learn

Attendees support volunteers, speakers and participants at the event, and take a shift at the Open Source Initiative’s booth. Let’s bring the spirit of sharing Open Technologies and learning together! Please confirm your participation in the specially featured workshops on Thursday, March 22, 2018 from 9.00 AM – 6.00PM. Attendees participate in the UNESCO Hackathon on Saturday, March 24 (2.00 PM – 10.00PM) and on Sunday, March 25 (9.00 AM – 5.00PM). Attendees help reach out to community members who cannot join us at the event, make tweets, share what you learn on social media, publish photos and put up blog post about the summit.

Apply Now

Apply for a free stay with #FOSSASIA #OpenTechNights supported by the Open Source Initiative and the UNESCO and participate at the FOSSASIA Summit 2018 now here!

More Information

More updates, tickets and information on speakers on our website:

Thank you to our Sponsors

We would like to thank our sponsors whose support enabled this event, and our other activities throughout our 20th anniversary in 2018.

Categories: Open Source

Either Hybrid or Native. Is that the question?

Liferay - Wed, 02/14/2018 - 05:33
In the very beginning of every mobile app project, we can have to face a tough decision: should I go for a native approach to make the most of the device capabilities and optimize the user experience, or should I prefer a hybrid development to make progress faster even though the result may be not as good. And you have to choose either one or the other. A few years ago the answer was quite easy: the hybrid technology was not ready yet (actually, ten years ago it didn’t exist).   Nowadays, the hybrid approach is mature enough to be considered an actual alternative, specially for enterprise apps. Besides hybrid, we also have a slightly different approach, called cross-platform, which consist of using third-party tools and languages that produce native code.   If you need a deeper understanding about native,  hybrid and cross-platform approaches, you can check  this webinar where we talk about it.   So in these days, the decision “native vs hybrid” is a difficult one: each company, project and team have different needs. You need to know the company, the market, the project goals, the team… the context, after all, to make the best decision. And when you know your context, you have to consider several factors. I found companies considering the following factors:
  • Know-how: Is my team able to do a native development both for Android and iOS? or maybe I only have access to web developers. In my opinion this is a critical factor.
  • Technical reasons: Is it possible to do the app without native code? Some apps require a tight integration with the device, and they make the most of sensors and device capabilities (camera, GPS, RFID) Others want a perfect UI with super-fluid and advanced animations and transitions.
  • Political/subjective/trend reasons: my competitors are using native, I read Facebook gave up on hybrid, my colleagues/developers say hybrid sucks... you know. 
Also, this decision has three important characteristics that makes it even more dreaded:
  • It’s a binary decision (almost): your app will be native or hybrid, but it can't be both at the same time. If you go for the hybrid path, it’s difficult to add advanced features that use native (Cordova plugins are an alternative, but not perfect). On the other hand, if you go for the native path, it’s tricky to add hybrid (HTML) content: you need to tweek a lot with embedded WebViews.
  • It’s a final decision, you can’t go back: maybe you want to start fast and small, with a simple hybrid development, and that works great. But a few months later, you need to starting implementing new features in native. You’re done because you need to start from scratch. Most of the hybrid projects regret because at some point, the app is technically limited. Also native projects regret because adding simple features can be difficult and slow.
  • It's a initial decision: you need to make the decision up-front. And that's probably the worst moment to decide (you know nothing, John Snow). It's so risky that the manager responsible for that usually asks for advice more than twice (and that's probably the reason why the Internet is full of articles about "hybrid vs native")
In the last year, we’ve been thinking deeply in this problem, and we believe we found a flexible way to approach mobile development without being constrained by that initial & final & binary decision. 
  • What if you don't need to decide once, at the very begining (decision per-app) and you can decide several times during the life of the app (decision per-feature)?
  • What if you can change your decision without starting from scratch if you think you chose wrong?
  • What if you can combine both approaches instead of choosing one or the other?
If you like this new approach, stay tuned. We really believe we found the sweet spot in the “native vs hybrid” dilemma!   Jose M. Navarro 2018-02-14T10:33:56Z
Categories: CMS, ECM

¿Cómo adoptar el modelo Fast Fashion de forma responsable?

Liferay - Tue, 02/13/2018 - 09:13

El concepto de fast fashion está cambiando la industria de retail.

Desde hace años, en la industria de la moda se ha trabajado para lanzar las nuevas colecciones al tiempo que aparecían las nuevas tendencias. Y, hoy los retailers están trabajando para hacer que los productos de las pasarelas de la moda lleguen a las tiendas en el menor tiempo posible, de forma más rápida que nunca. El resultado es un mercado de retail que responde rápidamente a los cambios en las tendencias, ofrece más de las cuatro temporadas tradicionales y hace que los clientes esperen encontrar los productos en las tiendas sin demora. El ideal moderno del “fast fashion” tiene como ejemplo las tiendas Walmart y Zara, que están acercando las tendencias de la moda de las pasarelas y showrooms a las tiendas en tiempo récord para ofrecer las últimas tendencias.

Sin embargo, recientes estudios han demostrado que a medida que las marcas intentan producir en masa los nuevos diseños, en el menor tiempo posible, la industria de retail está aumentando los residuos, perjudicando a los entornos de trabajo, que se ven afectados por una demanda creciente./p>

La pregunta principal es: ¿Cómo puedes afrontar la adopción del modelo fast fashion de forma responsable respetando a tus empleados y al medio ambiente en general? La solución radica en transformarse digitalmente y mejorar la forma en la que las empresas operan mediante la tecnología moderna de retail.

Garantizar la velocidad en todas las áreas es la clave para una implementación exitosa de las estrategias fast fashion. Mientras que muchas empresas ya aplican esta visión a los procesos de fabricación de los productos y de manipulación de los materiales utilizados, reducir los tiempos en todas las áreas de forma constante y rápida puede ayudar a que tu empresa se mueva con más agilidad que nunca sin causar un daño excesivo, ni malas condiciones de trabajo. Las siguientes estrategias están diseñadas para aprovechar la tecnología moderna de retail para reducir el perjuicio resultante de la operativa de estos negocios, eliminando los efectos negativos que actualmente afectan y se asocian a los retailers. Para que estas mejoras puedan tener un impacto positivo en tu compañía, considera cómo cada una de ellas puede ser aplicada a tu empresa de retail, conforme a sus particularidades.

Explotar el análisis de datos/h2>

Una importante característica del fast fashion es la capacidad de anticiparse con acierto a las tendencias y los gustos de la audiencia. Zara se ha convertido en un referente del fast fashion moderno debido a la puesta en marcha de una estrategia que buscaba comprender mejor los intereses de su público objetivo a través del análisis de datos.

Zara revolucionó el proceso típico de previsión de tendencias y de abastecimiento de los almacenes de las tiendas, sustituyéndolo por una estrategia que consistía en la provisión de una pequeña cantidad inicial del nuevo producto. Después, recopilaba los datos provenientes de las ventas y los comparaba con los SKUs (número de referencia en almacén) del departamento de logística. Además, Zara cuantificaba qué estilos, colores y otros detalles eran los más vendidos, utilizando esa información para llevar a cabo los siguientes diseños y pedidos. El resultado fue un ciclo a corto plazo en el que se eliminaban los estilos menos populares y se enfocaba la producción a aquellos que tenían mayor probabilidad de venta.

Mientras que cada tienda de retail tiene que adaptar su estrategia a sus objetivos en particular, lo más importante es que Zara siempre se centra en los datos y profundiza en los detalles más pequeños con el fin de generar insights extremadamente valiosos. No solo es crucial recopilar datos de tu equipo de ventas y de los inventarios de manera clara y medible, sino también interpretarlos correctamente. El éxito puede significar un inventario optimizado y reduciendo los productos que no son populares entre tu público objetivo.

Optimizar la Entrega

Tal como demuestra la compra de Jet por parte de Walmart, un aspecto importante del éxito del fast fashion es la forma en la que una marca hace llegar sus productos a sus clientes. Si bien el uso efectivo del análisis, como discutimos anteriormente, ayuda a mantener el stock apropiado en los inventarios, los retailers deben hacerlos llegar rápidamente a los clientes para cumplir las expectativas de la era del fast fashion.

A través del uso de Jet, Walmart fue capaz de incorporar un algoritmo de precios en tiempo real en su tienda online, lo que permitió aplicar una reducción en el coste de los artículos conforme se agregaban más productos al carrito de la compra. Pedidos de compra mayores implican menores gastos de envío, tanto para clientes como para la tienda, además de una disminución de desperdicios causados por el proceso de envío. Combinado con otros descuentos, el algoritmo es parte de una estrategia para aumentar las compras online, disminuir los gastos de envío y fomentar la parte online del negocio. Además, la creación reciente del Walmart Pay les permitió a los clientes comprar artículos a través de su dispositivo móvil mientras estaban en la tienda física, facilitando a los usuarios obtener de forma más rápida los productos que desean. Según PYMNTS, el uso de la aplicación por primera vez ha crecido un 31,7% en Junio 2017, con respecto a Marzo del mismo año y sigue demostrando un crecimiento estable de su uso.

Además, otras empresas como Rent the Runway, servicio de alquiler de ropa para ocasiones especiales, ha explotado sus datos y simplificado sus procesos internos para predecir mejor las necesidades de sus clientes y atender a sus deseos de recibir los productos en plazos de un día, con el objetivo de estar a altura de sus expectativas. Algo que han impulsado compañías como Amazon. El envío de productos a clientes en menos tiempo acelera los ciclos de compra, algo fundamental en el fast fashion.

Facilitar la compra

El fast fashion consiste en algo más que únicamente proveer los productos a los clientes lo más rápidamente posible. Es también permitir que estos mismos clientes conozcan, se interesen y compren estos productos rápidamente. De esta manera, los retailers pueden reducir los tiempos entre la creación del inventario y la venta, así como analizar los datos provenientes de los procesos de compra para utilizarlos como apoyo para decisiones futuras.

A día de hoy, los clientes esperan altos índices de usabilidad y procesos de pago rápidos durante la compra online. Además, las experiencias omnicanales de retail acercan más que nunca los procesos de compra online y offline. Mediante el uso de tecnologías de retail para fomentar el interés del cliente por los productos online, y la finalización de la compra en la tienda física, los retailers pueden facilitar y agilizar los ciclos de compra de su público objetivo.

Transforma Digitalmente tu empresa de retail

Satisfacer las demandas actuales del fast fashion no es el único beneficio de la transformación digital para los retailers. Ya sea ofreciendo a los clientes la experiencia online que esperan o equipando a tus empleados con las herramientas y tecnologías modernas necesarias, la transformación digital del sector retail puede tener numerosos beneficios. Lee más sobre la temática y empieza tu proceso de transformación digital.

Lee el Whitepaper   Maria Sanchez 2018-02-13T14:13:33Z
Categories: CMS, ECM

Adaptive Media Released

Liferay - Tue, 02/13/2018 - 06:32

I am very pleased to announce the first release of Adaptive Media available for Liferay 7 GA5 and Liferay DXP. Below you can find the links to download the app from Liferay Marketplace.

Download Adaptive Media DXP Download Adaptive Media CE
What is Adaptive Media?

In case you are unfamiliar to Adaptive Media and you want to know more about how this powerful app can help you to deliver the right content to the right device I recommend you to read our official User Guide and Developer Tutorials.

In case you prefer a video, you can also see the presentation of the feature in Liferay Devcon 2017.

This is a sneak peak of what you can do with Adaptive Media:

The Adaptive Media app tailors media in your portal to the device consuming it. Since users often consume media on multiple devices that have different screen sizes and capabilities, you should make sure that your portal presents that media in a manner suitable for each device.

The source code of Adaptive Media is available in GitHub


Adaptive Media can be installed from Liferay Marketplace. The app is composed of multiple modules and all of them are installed by default, although some of them are optional. You can see a list and description of the module in the documentation. 

If you are installing Adaptive Media in a Liferay installation that has images added in Documents and Media you might want to run some upgrade commands using the Gogo console.

If you are interested in supporting animated GIFs you will also need to install a separate command line tool named Gifsicle as described in the documentation.

Adaptive Media installation in Liferay Portal 7 GA5 requires an additional step. Please make sure to read the installation documentation if you are using this particular Liferay Portal version.

Special thanks goes out to the Collaboration Team (formed by devs, qa engineers, designers, product managers, tech writers, etc) and for everyone in the community sharing their feedback and tests with the Adaptive Media early access beta program.

Bug Reporting

If you have found a bug in the Adaptive Media released you car report the issue on and select "Adaptive Media" as the affected component. 

Known Bugs

In Liferay Portal 7 GA5 deploying Adaptive Media will throw some console errors. These errors go away after restart and they have no functional impact on the application. This is reported in LPS-76624

Sergio González 2018-02-13T11:32:56Z
Categories: CMS, ECM

PrestaShop loves you! <3

PrestaShop - Tue, 02/13/2018 - 05:49
Obviously. We met in 2007, united by two passions: e-commerce and open source.
Categories: E-commerce

2018 French Finance Law No. 2017-1837 of 12/30/2017

PrestaShop - Mon, 02/12/2018 - 11:05
Yes, this does concern e-commerce  DOES NOT CONCERN:
Categories: E-commerce

My experencies at the Sprint: Form Processor and Action Provider extension

CiviCRM - Mon, 02/12/2018 - 08:03

Last week we had a Sprint in the wonderful city of Brussels. This blog post is a recap of what I have been up to.

Form Processor

I started the sprint to work on a new extension the form processor.  This idea came to my mind as I had a few clients at which I had to develop a custom api for data coming from their website (in those cases CiviCRM was separated from the website). And my idea was that I wanted to give system administrator and implementers a tool in which they could create those kind of API by themselves. So the form processor was born.

Categories: CRM

CiviCRM Pivot Report

CiviCRM - Fri, 02/09/2018 - 12:56

Aloha, everyone! As you all know, CiviCRM is shipped with a lot of useful report templates for each CiviCRM entities. You can use these templates to create difference report instances to interrogate your data.

Categories: CRM

Using and improving the Documents extension (a Drupal extension by CiviCoop)

CiviCRM - Thu, 02/08/2018 - 23:26

CiviCoop have produced a wonderful extension, Documenten, which provides some great new features for adding attachments to Case Activities and storing them in a user-friendly way (a Documents tab on the Contact record), as well as the ability to update files with newer versions of the file. Some of the extensions features were only functioning when Cases and Activities were being created through the Webform CiviCRM feature.

Categories: CRM

Improvements to inbound emails to Cases in 4.7.30

CiviCRM - Thu, 02/08/2018 - 23:00

MEAA are a union organisation in Australia with a very wide brief including both union activism and membership drives, as well as legal services to its members.

They use Cases extensively and we were keen to deliver some improvements to 'inbound email' so that they could include the case id in the subject, and have the email added to the relevant case.

Categories: CRM

Controlling which Activities have Notifications sent to the Assignee

CiviCRM - Thu, 02/08/2018 - 22:25

We have recenting been working with MEAA to build new functionality in to their CiviCRM in order to build their capabilities.

One of the requirements that arose was to be able to set some Activity Types to send notifications to the Assignee without triggering them for all Activity Types.

This feature was accepted by core and is now available in 4.7.30 release.

Categories: CRM

Why I want you to run for the OSI Board

Open Source Initiative - Thu, 02/08/2018 - 20:28

The Open Source Initiative board is homogeneous, stratified across generations.

We fit across three (tech) generations of contributors to free and open source software–those who were involved in the early days of free software; those who found places in the community after open source had been established; and the group paultag humorously dubbed the GNU generation–none of us have lived in a world without the explicit concept of user freedom.

Within my cadre of FOSS-loving millennials, several of us have fairly similar stories, both inside of our FOSS lives and out: we all had formative life experiences of financial hardship, and tech helped us emerge into comfortable, middle-class lifestyles. We’re all community-focused and have worked as community managers. We’ve been finalists for the same jobs.

That is to say, while we have different opinions and different outlooks, we all come from fairly similar places.

While I would not go as far as to say the same is true across each generation represented in the board, we do a fairly good job of agreeing with one another. Occasionally we argue, but that frequently comes from practical points and specific concerns relating to the gritty logistics of making decisions for an organization.

We have a range of experiences represented when you take the board as a whole, but not as different as I would like to see.

The fact is, the board does not represent the greater FOSS community. This is why it’s important for more people to join the OSI–in order to vote in elections and make sure their voices are represented. In order for this representation to be real, we need people from different backgrounds and viewpoints to stand for election and become board members.

To say this in more explicit terms: the OSI board is extremely (exclusively) white. Two board members are European, eight of us from the United States, and there is one Canadian. I think this is a problem.

What do I want from you? If you’re from outside North America, I want you to run for the OSI board. If you’re a racial minority, I want you to run for the OSI board. If you come from a background that is a part of the FOSS movement, but not represented, I want you to run for the OSI board. Are you from North America? Are you white? Are you a college educated coder working in a cool tech job? That is -awesome-. I am some of those things. I want you to reach out to your friends with different backgrounds, experiences, and knowledge and encourage them to run for the OSI board.

Think you’re unqualified? You’re totally not. One of the things I’ve learned about life–and especially FOSS–from three of my amazing free software mentors is that we’re never qualified when we start something new–or at least we don’t feel that way. I had no clue what I was doing when I first thought about running for the OSI board. All I knew was that I wanted to do more for the community.

Think you’re too busy? You might be! You might not be! We’re a pretty busy lot, and we each put in what we’re capable of. Sometimes that’s advice and ideas; sometimes it’s fundraising, financial literacy skills, ideas, organizing, writing, and anything else you bring to the table.

Think you’ve nothing to say? I bet you do.

Joining a board is not only about you–it’s about giving back to the community that has given you so much. It’s about pushing a movement forward. It’s about bringing the ideas and voices of others to the table, and making sure that everyone is heard.

If you’re interested in running, but scared, uncertain, don’t think you’re qualified, want help, or just want to talk more about the responsibilities, please email me at molly [at] opensource [dot] org or Josh Simmons at josh [at] opensource [dot] org.

Board members also get sweet email addresses, and that alone is reason enough to run.

Previously, the board was appointed by the board. This gave them the opportunity to create a group representing a range of experiences and skill sets, as well as fill necessary niches of knowledge (licensing, technical skills, community organization, etc). Now that we have a board elected by membership, it’s more crucial for people to both nominate themselves, if they don’t see enough representation, and join the OSI. In order for elections to actually reflect the FLOSS community, wee need a strong, varied membership from all over the world. So, in addition to running or encouraging your friends to run, consider joining as an Individual or Affiliate member.

Categories: Open Source

Angular 2+ Portlets in DXP

Liferay - Thu, 02/08/2018 - 15:59

So I've been working a lot more with Angular 2+ recently (Angular 4 actually, but that is not so important) and wanted to share some of my findings for those of you whom are interested...

Accessing the Liferay Javascript Object

So TypeScript is sensitive to defined variables, classes, objects, etc.  Which is good when you want to make sure you are building complex apps, type safety and compilation help to ensure that your code starts on a solid foundation.

However, without a corresponding .ts file to support your import of the Liferay javascript object, TypeScript will not be able to compile your code if you try to use the Liferay object.

That said, it is easy to get access to the Liferay object in your TypeScript code.  Near the top of your .ts file, add the following line:

declare var Liferay: any;

Drop it in like after your imports but before your class declaration.

This line basically tells Angular that there is an object, Liferay, out there and it is enough to pass the compile phase.

Alternatively you can use the following syntax:


to get to the object, but to me this is not really the cleanest looking line of code.

Supplying Callback Function References to Liferay

So much of the Liferay javascript functions take callback functions.  For example, if you wanted to use the and Liferay.on() mechanism for in-browser notification, the Liferay.on() function takes as the second argument a Javascript function.

But, when you're in your TypeScript code, your object methods are not pure javascript functions, plus as an object instance, the method is for a particular object, not a generic method.

But you can pass a bound pointer to an object method and Liferay will call that at the appropriate points.

For example, if you have a method like:

myAlert(event) { alert('Received event data ' +; }

So if you want it to be called on a 'stuff-happened' event, you could wire it up like:

ngOnInit() { Liferay.on('stuff-happened', this.myAlert.bind(this)); }

The this.myAlert.bind(this) is used to bind up sort of a proxy to invoke the myAlert() method of the particular instance. If someone does a:'stuff-happened', { data: 'Yay!'});

Liferay will end up invoking the myAlert() method, providing the event object, and the method will invoke the alert() to show the details.

Sometimes it is advantageous to have the callback run inside of a zone.  We would change the above ngOnInit() method to:

constructor(private ngZone: NgZone) {} myZoneAlert(event) { => this.myAlert(event)); } ngOnInit() { Liferay.on('stuff-happened', this.myZoneAlert.bind(this)); } Using NgRoute w/o APP_BASE_HREF Errors

When using NgRoute, I typically get runtime browser errors complaining Error: No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.

This one is pretty easy to fix.  In your @NgModule declaration, you need to import the APP_BASE_HREF and declare it as a provider. For example:

import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { APP_BASE_HREF } from '@angular/common'; import { AppComponent } from './app.component'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule ], providers: [{provide: APP_BASE_HREF, useValue : '/' }], bootstrap: [AppComponent] }) export class AppModule { }

The important parts above are (a) the import of APP_BASE_HREF and (b) the declaration of the providers.

NgRoute Without Address Bar Changes

Personally I don't like NgRoute changing the address bar as it gives the really false impression that those URLs can be bookmarked or referenced or manually changed.  The first time you try this, though, you'll see the Liferay error page because Liferay has no idea what that URL is for, it doesn't know that Angular might have taken care of it if the page were rendered.

So I prefer just to block the address bar changing.  This doesn't give false impressions about the URL, plus if you have multiple Angular portlets on a page they are not fighting to change the address bar...

When I'm routing, I always include the skipLocationChange property:

this.router.navigateByUrl('path', { skipLocationChange: true }); Senna and Angular

Senna is Liferay's framework that basically allows for partial-page updates for non-SPA server side portlets. Well, it is actually a lot more than that, but for a JSP or Struts or Spring MVC portlet developer, it is Senna which is allowing your unmodified portlet to do partial page updates in the rendered portal page w/o a full page refresh.

Senna may or may not cause you problems for your Angular apps. I wouldn't disable it out of the gate, but if during testing you find that hokey things are happening, you might try disabling Senna to see if things clear up for you.

Find out how to disable Senna here:

I say try your app w/o disabling Senna first because, well, if you disable Senna globally then your non-SPA portlets revert to doing full page refreshes.


So that's really all of the tips and tricks I have at this point.

I guess one final thing I would leave you with is that the solutions presented above really have nothing to do with Liferay. That's kind of important, I found these solutions basically by googling for an answer, but I would leave Liferay out of the search query.

When you think about it, at the end of the day you're left with a browser with some HTML, some CSS, some Angular and non-Angular Javascript. Whatever problems you run into with Angular, if you try to solve them generically that solution will likely also work for fixing the problem under Liferay.

Don't get too hung up on trying to figure out why something in Angular is not working under Liferay, because you are not going to find a great deal of articles which talks about the two of them together.


David H Nebinger 2018-02-08T20:59:52Z
Categories: CMS, ECM

CiviCRM 4.7.30 and 4.6.35 release

CiviCRM - Thu, 02/08/2018 - 13:30
Greetings, CiviCRM community!   First CiviCRM release this year is now ready to download.  RELEASE NOTES: Big thanks to Andrew Hunt from AGH Strategies for putting up together release notes for this version.  The release notes for 4.7.30 can be accessed  here.   SPECIAL THANKS:
Categories: CRM
Syndicate content