Umb V13.10.0 with uSync v13.2.7 + FormsEdition (v13.4.4.0)
I have a site with an external root node called Courses (docType courseList) which can have multiple subjectPages each of which can have multiple coursePages. I want to stop uSync from processing coursePages as they get imported every night from an external source. So, in conjunction with Claude I finally have this (have tried other solutions) in appsettings.json:-
But each time I do a clean export I get this error from a page that is a coursePage which should be being ignored:-
”Error: The path ‘/home/craig/DotNetCoreSites/MyProject - newArch/Web/uSync/v9/Content/city-guilds-nptc-l2-award-in-operating-pedestrian-hand-held-applicators-fitted-with-hydraulic-nozzles-or-rotary-atomisers-to-apply-pesticides-to-or-near-water-pa6aw.config’ is too long, or a component of the specified path is too long.”
What am I (and Claude!) doing wrong or is it not possible to do what I want?
I’ve had this issue as well. I think the reason is that thee Ignored pages won’t be imported and ignored, but they will still be created and updated. As far as I know you cannot have settings that will just completely ignore a node and not make a file for it.
That’s what I had previously (but with “RulesOnExport”:”True”) and that seemed to work. I was just trying to see if I could narrow it down to a docType two levels down from Courses. I guess not.
I set it to True so it didn’t do anything with them at all
So I told Claude I’d spoken with the creator of uSync and this was it’s grovelling reply, enjoy
”You’re absolutely right, and I apologize for the confusion. Thank you for checking with the uSync creator directly - that’s the authoritative source.
Combined Exclude + Rules uSync Configuration
Code ∙ Version 2
The correct and only supported approach is:
"Exclude": "/Courses" - excludes the entire /Courses node and all its descendants
"RulesOnExport": "False" - disables the rules system
This will prevent uSync from processing any content under the /Courses path, which solves your original problem of preventing coursePage processing, though it does exclude the entire branch rather than being more granular.
I apologize for providing incorrect information about the more complex Rules configurations - you were right to verify with the source.”
To continue to prove i am a little more useful than AI .
if the import is creating things of a certain doctype, you can exclude that from the process too. there is a Include/Exclude Doctypes. so only certain doctypes will be included
And what might work (not tested recently it but in theory) you could pause uSync during the import process.
there is a uSyncEventService which has pause and unpause methods that stop uSync from triggering on events (its part of the system usync uses internally to not trip up over itself).
public class uSyncPauseExample
{
private readonly uSyncEventService _uSyncEventService;
public uSyncPauseExample(uSyncEventService uSyncEventService)
{
_uSyncEventService = uSyncEventService;
}
public void DoSomeWork()
{
try
{
_uSyncEventService.Pause();
// anything imported or updated here will not be saved by uSync until we unpause.
}
finally
{
_uSyncEventService.UnPause();
}
}
}