Category Archives: tech

SharePoint 2010 Survey Issue

I recently had a problem where I have a site for hosting #SharePoint #Surveys. This was working amazingly with custom permissions so the users could only add items. The problem came when we introduced #branching into the questions. It appears that SharePoint creates the item after the first question so when the second one comes around the user will get “Access Denied” message. Obviously something as simple as this to fix shouldn’t have taken this long to figure out!

So if you have the same problem, just give your #PermissionLevels edit access as well as #AddItems – especially if you want to use branching!

Degraded Search SharePoint 2013

So recently I came across this error within #SharePoint2013.

Search service overall state: Degraded

1

This was actually really easy to fix for me in this instance.  Both of my WFE’s had run out of space on the Index #LUNs. As soon as I expanded the disk, the #Degraded warning triangle disappeared!

Nice and simple but make sure you check this before resetting the Index.

Pokemon Go + 30yo Male

Well today has been an interesting day, for some time I have wondered what the whole #PokemonGO phase was about so I decided to put the app on my phone. BIG MISTAKE.

Seriously you have to go around and see rustling in bushes which means there could be a Pokemon about. The aim is to catch as many different ones as you can. When you come across a Pokemon you have to try and capture it. This happens by throwing a ball and trying to capture the creature.

It’s so addictive, me and 3 other mates all grown men walking around the office carpark trying to find these Pokemon! I don’t even like Pokemon!

I ever found one at my desk at work!

So yeah…if you want to have a life, not get addicted then DO NOT download the app onto your phone. Your life will be over!

Restart SharePoint 2013 Workflows with PowerShell

Recently I had an issue where my #SharePoint list #workflows wouldn’t run and were in suspended state. The reason for the suspended state was an item already existed in the destination folder where the workflow was supposed to move the file to.

I tried lots of tricks to get the workflows to automatically start, I had about 250 instances of this happening and no scripts I found online would resolve this issue. They just wouldn’t cancel / resume.

In the end I removed the workflow from the list (which killed all instances) and then republished. Perfect. Now how to start them all again? Hmm

Well because these are #SharePoint2013 Workflows that run on a workflow management server, the normal scripts for starting them are different. To cut it short, use the following #script and all should be good.

$sourceWebURL = ‘http://YourURL
$sourceListName = ‘YourListName
$TargetWorkflow = ‘YourWorkflowName
$spSourceWeb = Get-SPWeb $sourceWebURL
$spSourceList = $spSourceWeb.Lists[$sourceListName]
$items = $spSourceList.getItems()

# Getting a Workflow manager object to work with.
$wfm = New-object Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager($spSourceweb)
# Getting the subscriptions
$sub = $wfm.GetWorkflowSubscriptionService()
# Getting the specific workflow within the list of subscriptions on the specific list. (SP2010 associated workflows basically)
$WF = $sub.EnumerateSubscriptionsByList($spSourcelist.ID) | Where-Object {$_.Name -eq “$TargetWorkflow”}
# Getting a Workflow instance in order to perform my commands.
$wfis=$wfm.GetWorkflowInstanceService()

Foreach($item in $items){
# Creating the dictionary object I need to parse into StartWorkflow. This could be most other workflow commands.
$object = New-Object ‘system.collections.generic.dictionary[string,object]’
$object.Add(“WorkflowStart”, “StartWorkflow”);
$wfis.StartWorkflowOnListItem($WF, $item.ID, $object)
}

All you need to do is edit the BOLD text above and you should be on your way. Copy and Paste it into PowerShell ISE and save as PS1. Then run the file through the SharePoint 2013 Management Shell.

Good Luck!

Creating default SharePoint permissions groups (Hostname site collection)

When you create a #Hostname #SiteCollection within SharePoint 2013 you will notice that the default user groups aren’t there. This is because they aren’t created when you use #PowerShell to create a hostname site collection.

To get these groups back, this can be done via PowerShell or simply doing the following:

Navigate to http://yoursitename/_layouts/15/permsetup.aspx

From this page you will see the following:

groups

Simply click on OK and the groups will be available.

The important part of the URL is

_layouts/15/permsetup.aspx

Have fun with your permissions!

NextScripts: Social Networks Auto-Poster

Oh for some time now I have been using NextScripts: Social Networks Auto-Poster, thisplugin allows me to automatically post blog posts to social networks. It’s quite handy but recently I noticed a lot of my posts weren’t being sent. Now because I don’t really use the WordPress interface, I use a third party blogging tool, I wasn’t aware there was an issue. Until I went to install some more plugins. I noticed this particular one was stating

“Not Enough Memory allowed for PHP. You have 32 MB. You need at least 64MB”

Because I run all my websites on my own server I couldn’t contact the hosting company because… I guess I am the hosting company. So a little digging around and I found that I needed to edit the php.ini file on my server. Easier said that done when you don’t know where it is… so I did a little digging around and came up with the following:

SSH into your server (if unix) with the following:

ssh username@domain.com

Then run the following command to locate the PHP.ini file:

php –ini

This will display where you php.ini file is and can be edited with the following command:

nano /usr/local/lib/php.ini

The above location may be different for you depending on your server but when you launch the following command the php.ini file will be opened within the editor and about half way down the file you will notice a memory option which is set to 32mb as default. Simply change this to 64mb and write out the file to save.

I didn’t need to reboot my server or restart any services, the changes were done instantly and the plugin started working again!

Until next time!

My recent hate towards the iPhone

For as long as I can remember I’ve always had troubles, some kind or another with #Apple #iPhones. Whether it be because of my own stupidity from #Jailbreaking, replacing parts myself because it seems so hard to get an appointment at Apple stores. One way or another I always well and truly mess my iPhones up. I’ve had them all except the S versions but ever since the very first iPhone my biggest gripe has always been the battery life! No matter what I do, what I close down, even when everything is turned off (little bit pointless in my opinion) they just seem to drain.

The latest scenario is my iPhone 6, the battery drain was ridiculous. I’ve had it well over a year now and the battery would jump from 100%, to 70% to 50% after just a few hours off charge. This wasn’t ideal for me with me doing on call for work. Sometimes it would show 40% and then 5 minutes later it would completely shut off. Wouldn’t power on or anything. Then when I plugged it in to charge voila it would miraculously be at 45% WTF?

So I decided to make a change, I went out and did what I do best and change phones. I bought out right the #LGG5 and boy what a phone it is! So many great features, battery life is incredible even without turning anything off!

I bought this as a stop gap until the #iPhone7 is released but depending how well I get on with this phone and if it can keep my interest I may not even make the swap! Watch this space!

Do you have iPhone battery issues? If so let me know below! I’m interested to see how other peoples batteries perform!

VPS Server

I’ve recently moved all of my websites from #GoDaddy shared hosting to my own #VPS server. I wanted to run my own installation of #Confluence on a server rather than just keeping it local to my Macbook so I can access from anywhere.

This was a challenging couple of days as I had no idea what I was doing, from setting up #cPanel to configuring my own name servers and backing up / Migrating my data to the new server.

So far I think I have everything working as I expect I just need to decide what to do with some of the domain names I own now.

This is going to be my main blog, but I’m also thinking of starting up some of my other projects that have been and gone because I just didn’t have the time to get them up a running.

More to follow.

Active X errors SharePoint 2013/ SharePoint 2010 & IE11

This may not be the same for everyone but I recently had this error at work and it was doing my head in.

When a user got upgraded to IE11 from IE8 and went to a #SharePoint site, they were presented with a nice #ActiveX error that just wouldn’t go away! After lots of Investigations and Googling I still couldn’t find a solution.

FIX: 

Eventually I decided to get our #webapp URL’s and Host-name site collections added into the trusted site list and deployed via #GroupPolicy

Now we don’t get any #ActiveX issues within the sites we added to the trusted site lists.

As I said above, it might not apply to everyone but it certainly worked for the company that I work at.

Host-named Site Collections

You must use #Windows #PowerShell to create a host-named site collection. You cannot use the #SharePoint 2013 Central Administration web application to create a host-named site collection, but you can use Central Administration to manage the site collection after you have created it.

You can create a host-named site collection by using the Windows PowerShell New-SPSite cmdlet with the -HostHeaderWebApplication parameter, as shown in the following example:

To create host-named site collections
  1. Verify that you have the following memberships:
  • The securityadmin fixed server role on the SQL Server instance.
  • The db_owner fixed database role on all databases that are to be updated.
  • The Administrators group on the server on which you are running the Windows PowerShell cmdlet.

An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 2013 cmdlets.

  1. On the Start menu, click All Programs.
  1. On the Start menu, click All Programs.
  2. Click Microsoft SharePoint 2013 Products.
  3. Click SharePoint 2013 Management Shell.
  4. At the Windows PowerShell command prompt (that is, PS C:\>), type the following syntax:
New-SPSite 'http://portal.contoso.com' -HostHeaderWebApplication 'http://<servername>' -Name 'Portal' -Description 'Customer root' -OwnerAlias 'contoso\administrator' -language 1033 -Template 'STS#0'

This creates a host-named site collection that has the URL, http://portal.contoso.com, in the SharePoint 2013 web application that has the URL ,http://webapp.contoso.com.