https://discord.umbraco.com
Join Discord
Do not copy node_modules on build
j

Josef Henryson

about 1 year ago
Hi. I am trying to create a custom property editor with Lit in U14. I can build the package locally with npm inside the package folder. But when I try to build my Umbraco project I keep getting this error:
Error    MSB3027
Could not copy "C:\Projects\***\App_Plugins\QuoteColor\node_modules\@umbraco-cms\backoffice\dist-cms\packages\block\block-grid\property-editors\block-grid-group-configuration\property-editor-ui-block-grid-group-configuration.element.d.ts" to "bin\Debug\net8.0\App_Plugins\QuoteColor\node_modules\@umbraco-cms\backoffice\dist-cms\packages\block\block-grid\property-editors\block-grid-group-configuration\property-editor-ui-block-grid-group-configuration.element.d.ts". Exceeded retry count of 10. Failed.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets    5254
I have tried to exclude the node_modules folder from my project but it keeps throwing this error. Any ideas on how to resolve this? Thanks, Josef
j
s
  • 2
  • 11
  • 87
[Solved] V13 live shows default 404 page and AntiforgeryValidationExceptions
c

Craig100

over 1 year ago
Have just put a locally running V13 site live and can't get it running. The back office is fine, the Preview and Live front end pages revert to the default 404 page (rather than the one set in appsettings). In the logs there is the following error:- Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {f1ae5c12-0cf6-4f78-863f-bb3cd0401206} was not found in the key ring. For more information go to https://aka.ms/aspnet/dataprotectionwarning at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) I've cleared all cookies and restarted but no improvement. Anyone any clues as to what I might have missed? Thanks.
c
  • 1
  • 2
  • 87
Smidge fails to find files
l

Luuk Peters (Proud Nerds)

8 months ago
I have an Umbraco 13 project (13.5.2, also tried to update to 13.6.0) where smidge fails to generate it's cache with an error:
[12:34:07 ERR] Connection id "0HNA1TCKBP0T2", Request id "0HNA1TCKBP0T2:0000000B": An unhandled exception was thrown by the application.
System.IO.FileNotFoundException: No such file exists /umbraco/assets/css/umbraco.min.css (mapped from /umbraco/assets/css/umbraco.min.css)
File name: '/umbraco/assets/css/umbraco.min.css'
   at Smidge.SmidgeFileSystem.GetRequiredFileInfo(IWebFile webfile)
   at Smidge.FileProcessors.PreProcessManager.<>c__DisplayClass8_0.<ProcessFileImpl>b__0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.CreateValue()
   at Smidge.FileProcessors.PreProcessManager.ProcessFileImpl(IWebFile file, BundleOptions bundleOptions, BundleContext bundleContext)
   at Smidge.FileProcessors.PreProcessManager.ProcessFile(IWebFile file, BundleOptions bundleOptions, BundleContext bundleContext)
   at Smidge.FileProcessors.PreProcessManager.ProcessAndCacheFileAsync(IWebFile file, BundleOptions bundleOptions, BundleContext bundleContext)
   at Smidge.Controllers.SmidgeController.Bundle(BundleRequestModel bundleModel)
https://cdn.discordapp.com/attachments/1334850297603821568/1334850582518825011/image.png?ex=679e07fb&is=679cb67b&hm=5d0a19c60737a6792e46ed5da08d135f6ac48db480abf9d5ee8cddd42599087c&
l
s
+3
  • 5
  • 24
  • 86
[Solved] How to get the current content's unique ID from within block editor modal?
b

Ben

11 months ago
I'm adding a property editor ui which needs to get a list of available items from an API controller, The API controller needs the content id (unique) that's being edited. My issue is that the property being edited is on a block, so it's displayed in the modal. I can't seem to find a context that will give me the unique of the content item being edited. I've tried using but there's nothing obvious. Any ideas, anyone had a similar issue?
b
n
  • 2
  • 5
  • 84
Umbraco.RenderMacroAsync
s

Skibz

about 1 year ago
Where is this method? Visual Studio keeps bitching that 'UmbracoHelper' does not contain a definition for 'RenderMacroAsync' and no accessible extension method 'RenderMacroAsync' accepting a first argument of type 'UmbracoHelper' could be found (are you missing a using directive or an assembly reference?) What am I missing here? Something that goes in the view imports?
s
h
j
  • 3
  • 3
  • 84
How do you register a Entity Framework Core DbContext in V13?
a

AaronSadlerUK

over 1 year ago
The documentation hasn't been updated and does not work, also what is shown in the documentation is using an obsolete method, I have taken a look through the source and I can see the tests are doing the following:
services.AddUmbracoDbContext<TicketsContext>((serviceProvider, options) =>
            {
   options.UseUmbracoDatabaseProvider(serviceProvider);
});
However when I run the site I get the following error:
Unable to create a 'DbContext' of type 'TicketsContext'. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[UmbTickets.DAL.DbContexts.Tickets.TicketsContext]' while attempting to activate 'UmbTickets.DAL.DbContexts.Tickets.TicketsContext'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
https://docs.umbraco.com/umbraco-cms/tutorials/getting-started-with-entity-framework-core#step-2-create-dbcontext-class
a
d
+2
  • 4
  • 12
  • 84
How to exclude certain document types from indexing
r

Ramya Devendiran

over 1 year ago
Umbraco v 10.8.3 I am importing 10000+ product data into Umbraco and I am indexing the data to a external LUCENE INDEX folder. LuceneIndex is created to perform facetted search. SAVEANDPUBLISH 10000+ content via code takes long time. I am wondering, If there is a way in Umbraco to exclude the PRODUCT document type from indexing so the SAVEANDPUBLISH will be quicker. https://docs.umbraco.com/umbraco-cms/reference/searching/examine/indexing documentation gives an example to create CUSTOM INDEX in examine on a specific document type.
r
m
  • 2
  • 3
  • 84
User Invites / Re-Invite Expiring Way too Fast
b

bh

8 months ago
In v13.5.1 my user invites aren't even lasting 24 hrs before expring. I re-invited someone today and in less than 3 hours Umbraco says it's expired. This has been happening a lot across multiple sites recently. Is there a config somewhere I need to adjust?
b
l
s
  • 3
  • 3
  • 83
Umbraco 14 equivalent to contentResource api service?
a

Aaron Sawyer

about 1 year ago
What is the new way of calling the umbraco api (contentResource) to fetch data, is there none? Do devs need to create their own controllers to fetch data from Umbraco? I'm in need of fetching node content from Umbraco to verify it is valid, and I'm not seeing any kind of backoffice api for fetching content.
a
r
+4
  • 6
  • 34
  • 83
Cant login to back office
c

Conner

over 1 year ago
Working on a solution locally, the password is just Password01 for testing right now. I wrote some code for a custom controller, and after a restart I can't login. I've even tried to reset the admin password as per the docs but I still get:
Oops! We couldn't log you in. Please check your credentials and try again.
c
j
m
  • 3
  • 4
  • 83
Previous262728Next

Umbraco

A hub and casual space for you to interact with fellow community members and learn more about Umbraco!

Powered by