Quantcast
Channel: ActiveTopics
Viewing all 72689 articles
Browse latest View live

Extend default razor email workflow

$
0
0

Is it possible to extend the default razor email workflow?

I would like to add some fields, for setting a welcome message, and other content.

I also want to be able to lookup the current form being sent inside the razor template.


Ignore option unavailable (2.0.1)

$
0
0

The documentation says that within the 'inbound link errors' section when bulk selecting an ignore option will be available. Where is this option found, would it be next to the delete icon that appears top right, or should it be located on the save button popup on the lower right?

Unfortunately I get neither.

Thanks for the help.

Handling Start Date & End Date, with a 'To Be Confirmed' Flag?

$
0
0

Hi guys, I have the below document type:

enter image description here

Now as you can see, when someone adds something they can select whether the event doesn't have a date yet, which is fine, but if they want to add an event and the event has a date, I want that to be mandatory, so you cant add events that are neither TBC, or without a date. But that then means if the date is TBC, then you'd still have to pick a date.

How this was handled in the past was that the description would advise a rough date is required and the client could choose the rough date, then choose TBC, then that would be shown instead of the rough date.

But is there anything anyone can think of to do it any differently?

Donut hole for Html.Partial

$
0
0

I am using MvcDonutCaching and Redis cache to cache the output of my web pages. This is working fine, but I wish to add a donut hole for a document type, because there are some random elements in it that should be different on each render.

The page is looping through its children as follows:

  @foreach (var page in Model.Content.Children.Where(x => x.IsVisible())
  {
    Html.Partial(page.DocumentTypeAlias, page);
  }

I know I can create a donut hole by using Html.Action instead of Html.Partial, but all the examples I can find use static document type names to render the partial in the action, e.g.:

[ChildActionOnly]
public ActionResult BlogPosts() {
    // ...
    return PartialView("BlogPosts", posts)
}

I need to find a way to pass the document type and IPublishedContent to the action. Anyone has any suggestions?

Why is a create new folder button missing after upgrading to 7.12.0

$
0
0

I recently upgraded to Umbraco 7.12.0, and cannot create a new folder from inside the content pages.

Is there any configuration which is missing ?

Any help would be highly appreciated.

enter image description here

Lucene Search Engine results Hebrew

$
0
0

Hi, I have implemented Lucene Search Engine results in my website, and it works flawlessly, except one distinct issue: When I try to search a Hebrew term that has double quotation marks in it, I get no results. For example: דפ"ר

this word should return results, but it doesn't.

Note: wild card works: דפ*

Any thoughts?

thanks, Rotem

Can Umbraco be integrated with any third party data ?

$
0
0

Hello, I want to use Umbraco to built a website. I know that while installing umbraco and getting started with it, we have to create a site database. But I on my website, I want to display data that is coming from a separate database. For example, on my website I want to create a search directory that is searching for data that user entered from a separate database than the site database. How do I achieve this regardless of any starter kit I use ?

Better way to check for Field value on an image

$
0
0
var image = Umbraco.Media(Umbraco.Field("myImage").ToString());
var lang = "en";
var fieldValue = image.GetPropertyValue<string>($"alt_{lang}");

I have the above code. I see that image is of type dynamic. But with dynamics I'm never sure whether a property or method exists. Is there a more strongly typed/better way of doing the above?

Ultimately I'd like to:

  • For a given page
  • Get the image from the field
  • Get some field value from the image

Email Notifications

$
0
0

Running Umbraco 7.4.1.

Appear to have installed Dialogue correctly (in that I can see forum, category, login,registation) in my content tree.

Registering/login of user also works, member successfully added in the Umbraco backend.

Having an issue though in that Email Notification is not working - as in when a member registers, requests a new password, email notifications of post replies.... no email is sent.

I have checked SMTP settings in web.config and settings entered correctly (as a test have also used smtp settings from a 2nd site I manage and still nothing) .

Have also added emails where needed on the forum settings within the content tree.

I'm not particularly techie, wondering if anyone might have an idea why email notifications wouldn't be sending?

Thanks

Matt

Media Item Discrepancies (cmsMedia and cmsPropertyData)

$
0
0

Hello,

I'm working on a process that queries our Umbraco db to find media items that have been added to our site. I've come across a discrepancy in the number of files recorded in the cmsMedia table and the cmsPropertyData table.

In testing this process, I was originally querying the cmsMedia table to find all PDFs we are currently hosting. I found that this list was NOT comprehensive and that our website has links to documents (which do exist) that are not recorded in this table.

I started to look around and found a package (FALM Housekeeping) that queries the cmsPropertyData table to find this information. After a little testing, I've found this table to be more reliable for this information.

I see that the cmsMedia table is a relatively new addition to Umbraco. Has anyone else experienced this issue? Are there any reasons why a document would be recorded in cmsPropertyData but not in cmsMedia?

Thanks for your help, Kyle

New Deployment

$
0
0

Hi,

I have finished some development locally and everything works fine. Amongst that development I upgraded the version of Umbraco. After testing everything locally I then published my site and uploaded to the server.

I am now getting a white page and the url is trying to go to: http://slaterbarton.co.uk/install/?redir=true&url=http%3a%2f%2fslaterbarton.co.uk%2fumbraco

Im guessing it has recognised that the version of umbraco has changed and needs to perform some sort of an install but I cant get it to do anything?

Im not sure how to resolve this so any help would be great. I have also restored a new version of the db which had to upgrade run against it.

Thank, Jay

Which programming language

$
0
0

Hi everyone,

I am going to learn what I'd call a 'proper' (I've been on html/css for years, learning xslt now too) programming language and I'm faced with a massive choice of different confusing stuff to choose from!

I've narrowed it down to c++ (because I have a book on that already!), c# (I am planning on sticking with umbraco for now so would be useful) or python (beginner language?). The web suggests python would be a good starting point but wouldn't learning c++ be an excellent starting point as it seems so much more widespread (but complex!), and unforgiving with mistakes, but learning accuracy is a good thing isn't it? What job requires a lack of accuracy?

Plus, then you get compilers/interpreters/object orientated/procedural etc etc... plus frameworks, wtf? I understand what an interpreter is and kind of what compiling is. I am no computer science degree graduate and I'm baffled, but determined to learn what it all means. (I also don't have the means or time to go and do a computer science degree either). I could do with a few (SIMPLE) pointers though without it turning into a pointless 'which language is best' argument. Just if anyone has any real, unbiased reasons for learning any of the above, that would be great. Even some stories of how you guys started programming or how you got into it, what you learned first etc.

I know this isn't totally to do with umbraco (well, c# would be...) but this forum has been very good to me with getting straight answers, not 14 year old kid immature answers like you get at many forums.

Thanks in advance,

Oh, and MERRY CHRISTMAS EVERYONE!! Hope you all have a great one!! :)) :))

Sam.

Umbraco PetaPoco, create stored procedures and views?

$
0
0

Using PetaPoco and Umbraco's Persistence namespace,

Is there anyway to check if a stored procedure exists, and if not run it's create procedure sql?

I'm thinking I can just run a query to check for the stored procedure and return true/false, and if false, run the Create Procedure, using PetaPoco's Sql object and executing it against the umbraco database context.

However, I wanted to post here to see if anyone has tried this before I get to that piece.

Basically, I have 3 custom tables my plugin has added (requires Ms Sql Server) and this plugin is mostly for in company use where I work.

For performance reasons, and ease of use in the API I've created views and stored procedures for working with these 3 tables.

In short, it's a permissions model that uses a bit flag based permission value and determines what permissions members have to content nodes for our plugin.

E.g.

-Create Category -Rename Category -Delete Category -Move Category -Create Article .... etc.

The permissions can be assigned to any content node, and they inherit down. Each content node can specific "break inheritance" to cause it to get new members/roles that aren't inherited from it's parents.

A permission can also be added to specific members to deny them access and deny trumps grant.

I've created a view that flattens permissions for members per content node.

For example,

If Bob inherits EditArticle permission from 1046, and is granted CreateArticle Permission on 1047 (child of 1046) then Bob's flat permission for 1046 will be EditArticle and CreateArticle (returns 1 row for 1046 with the combined XOR'd values of it's parents until it hits a BreakInheritance).

Works great..

I just want to be able to easily create them on fresh deployments accross our environments.

I could do all the logic in the application, but it's a lot faster doing the heavy sql lifting in a stored proc allowing the application code to be simplistic.

I noticed that umbraco doesn't use a single stored proc or view though, so I'm not sure there is anything in the API to do this, and PetaPoco looks like I'll have to do what I suggested above.

folder id only works hardcoded...

$
0
0

Im trying to load images from a folder ind the media library. It works fine with hardcoded id (1291) but if I change it to CurrentPage.billeder I get error:

System.Array' does not contain a definition for 'Children'

@CurrentPage.billeder

@{
    var media = Umbraco.Media(1291); 
    var selection = media.Children("Image");

    if (selection.Any())
    {
        <ul>
            @foreach (var item in selection)
            {
                <li>
                    <img src="@item.GetCropUrl("large")" alt="@item.Name" />
                </li>
            }
        </ul>
    }
}

Create new item "Server Error: failed to retrieve data for empty content item type"

$
0
0

Umbraco version 7.1.9 assembly: 1.0.5443.21804

Posting screenshot(s) of the flow on how we recreate the issue and what the error is:

enter image description here enter image description here

So if anyone has an idea of what may be causing this, THANKS for any help resolving it :)


ImageProcessor.Web and PostProcessor | Resized file disk size bigger than original file

$
0
0

As title says, I'm trying to do a simple resize with the following format

http://localhost:62622/media/1010/my_image.png?width=1900&height=500

The original files (tested with multiple files) are .png with different sizes, but after processing the size files get bigger.

For example

File A (works fine)

  • Before resize: 256 x 256 with 4.6 KB
  • After resize: 40 x 40 with 580 B

File B (bigger size)

  • Before resize: 2200 x 600 with 1.3 MB
  • After resize: 1900 x 500 with 1.5 MB

Do I need an extra configuration or it has something to do with my original images?

Using:

  • Umbraco 7.5.14
  • ImageProcessor 2.6.2.25
  • ImageProcessor.Web 4.9.3.25
  • ImageProcessor.Web.PostProcessor 1.3.1.25

How would you build this news page?

$
0
0

I'm looking for some help / guidance on how you would recommend building a news / search page.

In the backoffice I am using nested content and I can select 3 different news article types. News, Videos, Download. enter image description here

I'm thinking I can create my news page with the help of Examine. But that's as far as I have managed to get.

I need to show the top 5 featured articles, which are set by a tick box on each article. The first featured article shows a hero image then the following 4 articles only show the article title and a short summary.

Below all of this, I'll list all the articles in date order with two drop down lists to allow for filtering the articles by type and/or category.

I started working on this but I was putting all my logic in the view but I think I should be moving stuff out to a controller. But I'm not clear on how to do this.

I'm using Models Builder too.

I know there is a lot of things to cover here but I'd appreciate any help.

Thanks, Owain.

Getting Descendants from Root node

$
0
0

I'm trying to get all descendants of the rootnode (or any node for that matter) from my UmbracoApiController, filtered with Linq.

So basicly what I would want to do is:

rootnode.Descendants(a => a.DocumentTypeAlias == "myDocType" && a.Name == "myName")

This is documented at: https://our.umbraco.org/Documentation/Implementation/Routing/MVC/querying

But somehow, when I select the rootnode form the UmbracoApiController, my IPublishedContent object doesn't have a Descendants() method.

var root = Umbraco.TypedContentAtRoot().First();

It does have a Children property, but obviously this only returns all the direct children, and not all descendants.

How else am I able to select all documents, filtered by DocumentTypeAlias, and probably also by other properties (CreatedAt for example)?

Umbraco load balanced slave server DISTRIBUTED CACHE NOT UPDATED

$
0
0

Hi community,

Wonder if anyone can give me a steer on this error: Scenario is two web servers in a load balanced environment, with one master CMS server separate and outside of the LB environment.

There is no shared file system, and master/slave servers are specified explicitly using the example given here:

Our master CMS server is updating the umbracoCacheInstruction table correctly. However. both load balanced web servers are reporting this error:

2017-08-26 12:29:23,186 [P6940/D6/T53] ERROR Umbraco.Core.Sync.DatabaseServerMessenger - DISTRIBUTED CACHE IS NOT UPDATED. Failed to execute instructions (id: 7192, instruction count: 1000). Instruction is being skipped/ignored The thread has been aborted, because the request has timed out. System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj) at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeout(Int32 millisecondsTimeout, UInt32 startTime, CancellationToken cancellationToken) at System.Threading.SemaphoreSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at Umbraco.Core.AsyncLock.Lock() at umbraco.SafeXmlReaderWriter.Get(IScopeProviderInternal scopeProvider, AsyncLock xmlLock, XmlDocument xml, Action1 refresh, Action2 apply, Boolean writer) at umbraco.content.GetSafeXmlWriter() at umbraco.content.UpdateDocumentCache(Document d) at Umbraco.Web.Cache.PageCacheRefresher.Refresh(Int32 id) at Umbraco.Core.Sync.DatabaseServerMessenger.RefreshByIds(Guid uniqueIdentifier, String jsonIds) at Umbraco.Core.Sync.DatabaseServerMessenger.NotifyRefreshers(IEnumerable1 instructions, HashSet1 processed) at Umbraco.Core.Sync.DatabaseServerMessenger.ProcessDatabaseInstructions(IReadOnlyCollection1 instructionBatch, CacheInstructionDto dto, HashSet1 processed, Int32& lastId)

From the error log, it looks like the semaphore expired while trying to get access to the cache file - but as the cachefile is on the local disk and has all the correct read/write permissions, I'm confused.

This is on Umbraco 7.6.3

Can anyone help?

Many thanks

Simon

Web Deploy / External Hosting Setup

$
0
0

I have set up a server and database with umbraco on a2hosting. I am using web deploy (I also tried ftp and it did the same thing) to publish to the host and it is only transferring the partial views, stylesheets, and scripts. Everything else, which has values locally, is completely blank. Is this normal? How am I supposed to do this? I can't find any legitimate tutorials on how to do any of this. Just documentation that answers nothing and the umbraco tv that only addresses local and cloud.

Viewing all 72689 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>