https://discord.umbraco.com
Join Discord
Examine indexes need to be rebuilt regularly
d

Dan

over 1 year ago
Hi, I'm working on a v13 site which has around 10k content nodes. It has a news search facility on the front-end which uses Examine and separately its Content Delivery API also powers a third-party app. We're finding that both the news search (which relies on the 'out of the box' External examine index) and the Content Delivery API keep failing to yield any results after 'a few days'. Logging into the CMS and rebuilding the indexes fixes it, but that's not a viable long-term solution. I wondered if anyone knows what might be causing the indexes to be dropped and/or if there's a way they can be automatically set to rebuild, periodically? The site is hosted on the client's own Windows VM — it's a decent spec AFAIK but it is used to host several sites. Could it be a memory issue? (Although I thought indexes were written to disk so that might not be too relevant?) Any pointers gratefully received!
d
j
  • 2
  • 1
  • 257
What is the correct way to implement a UmbracoApiController with a (JWT)Bearer token authentication?
n

Navorski

about 2 years ago
I would like to have only 1 API controller that is authenticated with a Bearer token, More or less like this implementation https://www.c-sharpcorner.com/article/jwt-token-creation-authentication-and-authorization-in-asp-net-core-6-0-with-po/ Only with the umbraco pipeline, this doesn't seem to work.
n
d
+2
  • 4
  • 25
  • 257
Umbraco + AppInsights
c

Chad

about 1 year ago
Does anyone have this fully working, including Exceptions being logged? We seem to be hitting a scenario whereby the actual Exception details are not being sent to AppInsights (but the 500 response is being logged).
c
d
j
  • 3
  • 10
  • 256
Query custom database (separate to Umbraco) with raw SQL
l

leekelleher

almost 2 years ago
> **Back story**: Since Umbraco 11, (when it stopped shipping with the "Microsoft.Data.SqlClient" library), I haven't been able to get the SQL data-source in my Contentment package to work. Prior to this, e.g. v9/v10, I could detect whether if a connection string was SQL Server or SQLite (or even earlier SQL CE). But without adding a dependency on "Microsoft.Data.SqlClient", I can't figure out how to make a raw SQL query on a custom database connection. If I have a custom database connection string, totally separate to the Umbraco database. This could be either SQL Server or SQLite. Should it be possible to reuse any Umbraco code to run a raw SQL query against that database? As far as my google-fu goes, there are many examples for EFCore, e.g. developing your own models/context (for inside the Umbraco database) ... but nothing for a raw SQL query. > Note, if you aren't familiar with the SQL data-source in Contentment, it lets a developer enter a raw SQL query to populate a list editor, e.g. dropdown list, radiobuttons, etc. Any code snippet examples would be hugely appreciated. 🙏
l
h
+3
  • 5
  • 15
  • 251
Best practice to hide connection string password
c

Conner

over 1 year ago
Hi, new to umbraco and wondering how we can hide the connection string in appsettings.json? Is it possible to be loaded from .env? I have googled quite a bit but can't find anything around the topic really.
c
d
  • 2
  • 12
  • 251
Preview Mode with Headless
s

Sebastian Pierre

12 months ago
We're working on a headless solution where the frontend is a sveltekit app that fetches data from Umbraco. We've used the Headless Preview-plugin to enable previewing content and it works fine, but it basically just redirects you to your headless solution, which means you lose all the fancy functionality that allows you to view your preview in different viewports. When inspecting the normal preview-mode in Umbraco there seems to be a simple iframe that shows the page. Is it possible to override this iframe url to show the headless frontend instead to keep the functionality?
s
j
b
  • 3
  • 8
  • 249
[Solved] Umbraco Forms Submit Always Refreshes Page
d

Danine Noble

over 1 year ago
I'm hitting a wall on where to look and could use another brain to throw suggestions on where I've gone wrong or what sort of place I could look for a conflict. I've got forms [using Umbraco Forms package] that should be showing a message on submit but instead all forms are reloading the page when they're submitted. There is no go-to page set, I can't see any issues in the console, network tab, or in Logs. Am I missing some setup? I have the 'RenderUmbracoFormDependencies(Url)' at the bottom of the head and am using the 'umb-forms-render-scripts' tag at the bottom of the body. As far as I can tell that's all that's required for setup? There is no other validation stuff or jquery or anything setup. Literally just installed & put those two snippets into the layout. Using the supplied 'insert form' data type and copy-paste of the RenderForm snippet from documentation. @await Component.InvokeAsync("RenderForm", new { formId = content.DisplayForm, includeScripts = false }) *tested with & without includeScripts just in case and it changes nothing.
d
s
d
  • 3
  • 11
  • 247
What service/helper/manager do I use to get the full file path of an media item (v10)?
z

ZimmertyZim

over 1 year ago
I am having trouble findding the relevant info in the docs. I have a media item (PDF file), I wish to attach this to an email. How can I find the full path of the media item? I am using v10. I have the file as a content model, so I can access the id etc. I used to use umbracoFile to do this, something akin to:
Server.MapPath(trainingLogFile.GetPropertyValue("umbracoFile").ToString());
alas the property is no longert there, or I need to find it via one of the services/helpers. Thanks.
z
o
+2
  • 4
  • 7
  • 246
Member VerifyUserTokenAsync
g

gad2359

almost 2 years ago
Hey there! I'm using Umbraco 12 and I wanted to provide a "forgot password" mechanism to frontend members. I'm currently asking for the e-mail to get the MemberIdentityUser member and then using the MemberManager.GeneratePasswordResetTokenAsync(member) to get the token. I then encode it and send the e-mail with the encoded token. After clicking the link in the e-mail, a controller is called with the encoded token and the user. A token validation is performed using MemberManager.VerifyUserTokenAsync(member, _options.Tokens.PasswordResetTokenProvider, UserManager.ResetPasswordTokenPurpose, token) I've also tried MemberManager.VerifyUserTokenAsync(member, "Default", "ResetPassword", token) Both return false. I've debugged it and can confirm the token sent (before encoding) matches the received token. What am I missing here? Thank you 🙂
g
d
+2
  • 4
  • 11
  • 246
[Resolved] I'm getting a 403 error trying to run Umb 14 in IIS
h

huwred

about 1 year ago
Any thoughts as to what I may have missed? App Pool user currently has full control on the folder, I have setup countless .netcore websites and never had this problem before.
h
a
m
  • 3
  • 17
  • 244
Previous789Next

Umbraco

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

Powered by