https://discord.umbraco.com
Join Discord
Content Cache not updated
m

MadhackerZA

about 1 year ago
Hi All, In the Umbraco v14.3 site that I'm busy with, I get data from an API endpoint and and save it to a document. The problem I'm having is the IPublishedContent still has the old data when quering the document.
// Get document from cache
_publishedContentQuery.Content(Constant.AvailablePricesDocumentGuid
)

//Logic to test if the data is still valid or must be updated

var doc = _ContentService.GetById(Constant.AvailablePricesDocumentGuid);

doc.SetValue("itemPrice", apiResponse.Price)

_contentService.Save(doc);
_contentService.Publish(doc,[]);
In the back office I can see the data is updated, but when refreshing the page it needs to display on has the old data and that's using IPublishedContentQuery. If i navigate to the back office and click on save and publish the content cache is updated and updated on the front end Any idea what i could be doing wrong? To my knowledge calling .Publish() should update the content cache, could be wrong. Any help would be appreciated. Thanks in advanced.
m
r
s
  • 3
  • 6
  • 68
Trouble with Controller receiving data from an Axios post
c

Craig100

about 1 year ago
I have a controller that is getting hit by a post from an Axios function. So far so good. Unfortunatelythe controller can't read the data. I've googled all over the place adding routes (not needed it's being hit anyway) and tried [FromRoute], [FromBody], etc. in the constructor. All to no avail. The id is always null. If anyone has any suggestions I'd be very happy to hear them. Controller code is below, what's being sent is in the image:-
[HttpPost]
// [Route("Users/DeleteUserNumber")]
public bool DeleteUserNumber([FromBody] string? id) {

    bool returnState = false;
    
    /*if (id != null  && Convert.ToInt32(id) > 0) {
        returnState = _UsersDataFunctions.DeleteUserNumber(id);
    }*/

    return returnState;
}
https://cdn.discordapp.com/attachments/1277376681082093590/1277376681606123591/image.png?ex=66ccf13d&is=66cb9fbd&hm=473618619eecaab457f1a6470c3b99f96124791dbf6597606460fd127f088cc5&
c
d
  • 2
  • 4
  • 68
Adding custom CSS to backend not working after publish
s

svampefett

over 1 year ago
[ SOLVED ] - Was most likely cache related, changing name of folder fixed the issue. https://cdn.discordapp.com/attachments/1229374256685645854/1229374256874524693/image.png?ex=662f72ff&is=661cfdff&hm=b6ec7735c861c50f21bd9ff4b38cde145fa37e3a1ad7e77d00297c7f851ed4c2&
s
k
s
  • 3
  • 6
  • 68
How to include DLL file dependencies in package
a

AaronSadlerUK

almost 2 years ago
I am working on a package which depends on DLLs which are not available on NuGet. I have tried putting the DLLs in the App_Plugins folder for the package however they are not being copied by the .targets file. I've also tried using xcopy with no luck. Any pointers on how to do this, as the code requires a string path to the dll, so that rules out adding as an embedded resource and using a Stream
a
s
a
  • 3
  • 16
  • 68
Migrating from Grid to Block Grid
c

CodeSharePaul

over 2 years ago
We have used uSync Migrations to migrate a site from Grid to Block Grid. It works great but it doesn't do anything with Embed, Form or Macro. It creates them as blocks and sets a property which is a label. Which is understandable. But we still need to work out what we are going to do with them. What have you done with your macros, forms and embeds when migrating from Grid to Block Grid?
c
a
  • 2
  • 6
  • 68
Umbraco 10 - Umbraco Forms - Issue with send email
r

RichHamilton

about 1 year ago
Umbraco 10 .8.3 Umbraco Form 10.5.6 Not defaulting to use sender email (from) address from Umbraco:CMS:Content:Notifications:Email or Umbraco:CMS:Global:Smtp:From I have even tried adding an email to Umbraco:Forms:Email:DefaultSender and none od those are being picked up by default to the emails aren't being sent unless the user adds a SenderEmail for each form (we have quite a few in this instance). Also, it means that we can't change these settings per environment. Anyone else had this issue at all ? And resolved it? Thanks Richard #umbracoforms
r
b
  • 2
  • 2
  • 67
Umbraco 14 - adding custom workspace action
m

mehdimiah_

about 1 year ago
Has anyone had any luck adding a custom button to the workspace? i am wanted to add a deploy button where i can trigger an api end point. something like the "time" button. I have taken a look at the docs, https://docs.umbraco.com/umbraco-cms/extending/customize-backoffice/vite-package-setup but im getting some errors with the vite package when following the tutorial. Has anyone been able to do this successfully? can anyone guide me / show me some code on how they did it? https://cdn.discordapp.com/attachments/1267861521392730153/1267861521573220413/image.png?ex=66aa538e&is=66a9020e&hm=217d831d84a07c6238c0047cc5aab0cda0c06c6319486e4b2b2b10524ed52dca& https://cdn.discordapp.com/attachments/1267861521392730153/1267861521791451146/image.png?ex=66aa538e&is=66a9020e&hm=2df52f5c13b215546273caac8aaf9ada427532b1bdce47265a9dbd56887e0bec&
m
h
  • 2
  • 1
  • 67
Home page displaying blank all of a sudden
a

accele

over 1 year ago
Hi, my home page is displaying blank all of a sudden after having made no changes to anything. I've turned off all google chrome extensions, tried different browsers and also tried republishing the site, any ideas? https://cdn.discordapp.com/attachments/1203708033562058823/1203708033767710790/image.png?ex=65d21377&is=65bf9e77&hm=2d642bca276bc5a537543baae8a06b0b800290c4f5d98a34463beca43e5c6e24&
a
r
r
  • 3
  • 13
  • 67
OnExternalLogin issue with member properties not saving
d

David Peck (Peck Tech)

about 2 years ago
Does anyone have much experience with external logins for members? I'm having issues trying to work out how data is supposed to be saved to member properties. I'm using the classic example as per the [documentation](https://docs.umbraco.com/umbraco-cms/reference/security/external-login-providers#example) but struggling to find an example where member properties are updated . Login works, AutoLinking works, my code runs, good values are set as the claim value, and I have properties of the same alias at the claim type, but no values are set against my members. Am I missing a step?
OnExternalLogin = (user, loginInfo) => {

                if (loginInfo.Principal.FindFirst(ClaimTypes.GivenName) is Claim firstNameClaim)
                {
                    user.Claims.Add(new IdentityUserClaim<string> {
                        ClaimType = "firstName",
                        ClaimValue = firstNameClaim.Value,
                        UserId = user.Id
                    });
                }

                if (loginInfo.Principal.FindFirst(ClaimTypes.Surname) is Claim surnameClaim)
                {
                    user.Claims.Add(new IdentityUserClaim<string> {
                        ClaimType = "surname",
                        ClaimValue = surnameClaim.Value,
                        UserId = user.Id
                    });
                }

                var continueSignIn = true;
                return continueSignIn;
            }
d
m
  • 2
  • 2
  • 67
uSync timeout pusing content from production to staging
s

Steffen Nielsen

about 1 year ago
Hi folks, One of our customers are trying to push a content section of over 700 pages from their production environment to their staging environment. This normally works fine with smaller batches, but with someting as large as this, they get the following error: /umbraco/uSyncReceive/uSyncReceiveApi/ImportPackFolder timed out to after 200013ms ---> System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 200 seconds elapsing. I have tried to find where to increase this timeout, in the hopes that they will be able to move the content in once, instead of having to split up the process. Thanks in advance.
s
k
  • 2
  • 5
  • 66
Previous353637Next

Umbraco

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

Powered by