Have you stumbled across this error message:
RebuildLinkDatabasesIndex|System.FormatException: Unrecognized Guid format.
With/Or this occurring when trying to publish site:
Publish to ‘web’|#Exception:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.AggregateException: One or more exceptions occurred while processing the subscribers to the ‘item:saved’ event.
The reason for me was during an upgrade from Sitecore 7.2 to 8.2 and an upgrade from WFFM 2.4 to 8.2, I got this when trying to run a “publish site” and when trying to “Rebuild Link Database”.
What took me some time to figure out was that it was caused by the WFFM Module. Apparently the example forms created in “/sitecore/system/Modules/Web Forms for Marketers/Sample forms”, had tracking events that didn’t have ids binded to them.
So first make sure you can see standard fields:

Next step:
Have your broken item opened and find the section “Advanced” with its field “Tracking”

If you also take show “Raw values” you can see that there’s an event with no id.

To fix this. Either remove it from raw values or by clicking “Goals” -> “Ok” then “Attributes” -> “Ok”.
This will remove the events that shouldnt exist.
I wish to give credit to Uli Weltersbach, which made a post about this on: Link here.
Please go read his blog. He also gives a way of finding your broken items either by Sitecore Powershell Extension or creating a form page.