25 May 2021

WSP not deployed in all SharePoint servers in the farm

If you want to deploy wsp file on the SharePoint farm ... and the installation failed on some of the farm servers -  then the solution is the timejob

SharePoint deploy

Run this code at SharePoint PowerShell

$farm  = Get-SPFarm

$disabledTimers = $farm.TimerService.Instances | where {$_.Status -ne "Online"}

if ($disabledTimers -ne $null)

{

    foreach ($timer in $disabledTimers)

    {

        Write-Host "Timer service instance on server " $timer.Server.Name " is not Online. Current status:" $timer.Status

        Write-Host "Attempting to set the status of the service instance to online"

        $timer.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online

        $timer.Update()

    }

}

else

{

    Write-Host "All Timer Service Instances in the farm are online! No problems found"

}

PowerShell timer job

Before reinstalling recycle time Job on each server

More info - read this forum


Yours,

Roi






29 January 2021

Create React, Angular or Vue widget at Liferay

In the last year I have made a small change in the professional aspect …

I switched from a Microsoft CMS (SharePoint) that works with .NET and windows IIS to a new CMS - Liferay

In Liferay, I work with Java, Linux servers with tomcat.(On AWS cloud)- I don't remember Microsoft 😖


Enough talking about myself... Let's do Liferay


Before 

You need to install before node.js, npm and yomoan. Also you need visual studio code.

Install the Liferay bundle generator

Run the following command (Create before folder for your project)

npm install -g yo generator-liferay-js

And now, generate the React project

yo liferay-js

nmp install

Select React Widget (Or Angular / Vue)

Now answer the questions about your project… (Name. category, localization etc… )

Liferay Angular

Chose with example code

Now the npm service installing the project 

The Code 

Open your project with visual studio code

Visual Studio Code

The package.json file is responsible for the settings of the project (name, version, category, etc.  …)

The assets\css\styles.css file is responsible for the style (you can add more files) .

The features\localization\Language.properties is the resource file. It can be a multiple languages, you need to and your local file like Language_iw.properties for Hebrew.

The features\configuration.json is the property of the widget. 

The files src\AppComponent.js and src\index.js are the files of the component.

You can add your new component like this.

Deploy

Run this command

npm run deploy

Liferay

On the page (at liferay) add your widget. You widget is under your category, and you can change the property that youadd on the json file.

Enjoy

Roi