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

Inconsistent Cultures on IPublishedContent?

$
0
0

I have a content type with 2 editors; one "Content Picker" and one "Media Picker". Both has "Allow varying by culture" set to true. I would like to fetch those property values programatically.

My backoffice is configured with 2 languages, "sv-SE" and "en-US". When I fetch the property values using IPublishedProperty.GetValue(isoCode), I noticed that the Content Picker has my two cultures as excpeted, but the Media Picker only has one culture with an empty value (on IPublushedContent.Cultures). Why is that? I expect to see two entries here as well.


Umbraco 7.5.14 ImageProcessor not working with Azure Blob Storage

$
0
0

I've followed this tutorial: https://our.umbraco.com/Documentation/Extending/FileSystemProviders/Azure-Blob-Storage/index-v7

On getting the media moved to an Azure Blob Storage. I don't have any problem with the first part, as far as the images being served from the "media" blob. But the ImageProcessor does not work anymore after converting to an Azure Blob Storage. I'd like to store the cached images in the azure blob, but don't need a CDN (maybe using the blob storage for the cached images requires the CDN?). What is incorrect about the tutorial above?

I've upgraded all ImageProcessor stuff that I can. ImageProcessor.dll - 2.7.0.100 ImageProcessor.Web.dll - 4.8.2.0 ImageProcessor.Web.Plugins.AzureBlobCache.dll - 1.5.0.100 (its not clear if this file is even required)

Here is are some of the config files: https://gist.github.com/bgilb5/1ee2a3516a1b2eae228407967f0d8e98

Checkboxlist Umbraco 8

$
0
0

Hello,

How can i get the values from a checkboxlist please ?

Thanks,

Kusum

Migrate existing Media section to AWS

$
0
0

We are looking at migrating an existing Media section over to AWS CloudFront.

The existing Media section is using the default Umbraco setup, Umbraco.Core.IO.PhysicalFileSystem. The AWS CloudFront solution will be using Umbraco S3 Provider, https://github.com/ElijahGlover/Umbraco-S3-Provider.

I have got the Umbraco S3 Provider working within a clean Umbraco solution. I now need to figure out how to setup Umbraco S3 Provider within an existing Umbraco website which is using the default Umbraco setup. I'm assuming it is not as simple as switch the file system provider in FileSystemProviders.config.

Any guidance would be greatly appreciated.

Content lost when updating from (Obsolete) Content Picker to Content Picker

$
0
0

We are looking to upgrade Umbraco from v7 to v8 and to prepare for the content migration discussed here: https://our.umbraco.com/documentation/getting-started/setup/upgrading/migrating-to-v8 we are following instructions to update all Obsolete Data Types to their updated counterparts.

We have noticed in development that on updating Obsolete Content Picker to Content Picker, any content we have set up is removed. This is far from ideal as would be a fairly large job for us to go through and re-add the content for all cases in all our environments.

We have not noticed the same behaviour for Media Picker. Content is not affected as we have found for content picker.

Are we missing something or is there no way around this and will we have to go through the content and re-populate it following the data type updates?

Many Thanks, Ben

Security update for March 2020

Grid in a Partial View

$
0
0

All the documentation seems to suggest displaying the grid content via a Template but is there a way to display the content within a Partial View?

I have tried something like this:

@inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.Test>
@using ContentModels = Umbraco.Web.PublishedContentModels;
@Html.GetGridHtml(Model.Content, "propertyAlias")

but I get Object Reference not set...etc

I can use

@Umbraco.Field("fieldname")

which returns json, but that's not really helpful.

It works fine in the Master template, but that's not much use either.

Dropdown data type: add value while creating content

$
0
0

Hello,

In Umbraco 8 i've got a dropdown data type with a list of writers.

Our editors would like to add a value to this list while they are creating a content item.

My knowledge of Angular is pretty basic so i prefer not to alter Umbraco. Anybody have any idea's?

Thanks in advance

Tim


indicate when item has been used in a newsletter

$
0
0

Hello,

For a website that has news items, and the possibility to add these news items to a 'newsletter' document type, I was looking for a way/best practice to 'flag' a news item as 'been used in neweletter'.

Ideally this flag is then seen on the news item in its container' list view.

Thanks in advance!

Tim

Adding custom attribute to BeginUmbracoForm

$
0
0

Hi

Trying to integrate Zurb foundation validation into an umbraco MVC implementation and need to add a custom attribute to the MVC form while using BeginUmbracoForm.

Anyone know of a way of doing this?

Jules

Discussion about tabs

$
0
0

Hi friends!

I've played around with the current alpha of Umbraco V8 and I must say that it looks really good, love the progress!

One thing that me an my co-workers have been trying to "settle" with is the new way of presenting "Tabs" in the Content-section. Here's a node with two tabs "Grid Content" and "Content":

enter image description here

The "Tabs" are now stacked in one long page, I've heard that one of the reasons for this is an upcoming "side by side"-editing feature to be able to edit two variants side by side. That makes sense.

But I'm still not 100% sold on this UI design so I would just like to open a discussion around this. Would someone argue that a doc type has to many properties if it has 4-5 tabs? How do you guys work with tabs? Are we the only ones that would miss the them?

I'm also thinking that the layout could be configurable? Maybe with some switch on the document type? (Render with Tabs: True/False)?

How to call url (so not an (angular)view) with action in tree?

$
0
0

Hi all,

We created a method to download media folder as zip. To use this, we added a Download surface controller with an action, so simply this url is enough to download the folder: /download/downloadaszip?id={nodeid}

Now I would like to add an action to the media section, so a user could simply click Download as zip and the download url is called.

I already created a component to add the action, this is quite simple, but I cannot get the url to work.

I now have this code:

    // the event listener method:
    void TreeControllerBase_MenuRendering(TreeControllerBase sender, MenuRenderingEventArgs e)
    {
        // this will add a custom menu item for all admin users
        // for all media tree nodes
        if (sender.TreeAlias == "media"
            && sender.Security.CurrentUser.Groups.Any(x => x.Alias.InvariantEquals("admin")))
        {
            // creates a menu action that will open /umbraco/currentSection/itemAlias.html
            var i = new Umbraco.Web.Models.Trees.MenuItem("downloadMediaAsZip", "Download als zip");

            i.AdditionalData.Add("actionUrl", $"/download/FolderAsZip?id={e.NodeId})");

            // sets the icon to icon-wine-glass 
            i.Icon = "download-alt";

            // insert at index 5
            e.Menu.Items.Insert(5, i);
        }
    }

Could anyone give advice in how I could get this url called when clicking the action?

Thank you!

Set same property for multi image upload

$
0
0

Hello,

For our website it is often the case that we need to add 5 or more Images to a content item.

On each image i've added a field for author or photographer.

Is it possible to upload (for example) 10 images and have all 10 image's author filled in with the same value?

Thanks in advance

Tim

Using IPublishedContent in razor helper method

$
0
0

Hello everyone!

I noticed that I use a code snippet in my template files very often. So to minimze code duplication I would like to make razor helper method of it. I would like it take the current model as a parameter. So my plan in to put it in "App_Code" to make it avaible to all template files. But when I us the following code:

@inherits Umbraco.Web.Mvc.UmbracoTemplatePage

@helper DoStuff(IPublishedContent model){
        //Do stuff
    }

I get the error message: "IPublishedContent could not be found found". I have tried to use some @using statements but I can't figure it out. Anything advice would help right now!

Note: As of writing this, I noticed that I could use a partial view, passing in the model to get the result I want. But could always be useful to know for the future!

Thanks!

//Johannes

JsonProperty Attribute not working in ApiController

$
0
0

Hello,

I have this code [Route("")] [HttpGet] public IHttpActionResult GetOrders([FromUri] GetOrdersDto dto)

where the dto has different names of fields

[JsonProperty(PropertyName = "start")]
public DateTime From { get; set; }

The problem is that the start name is ignored and therefore always NULL.

Does Umbraco not using JsonNet as default formatter ?

Any help appreciated!


HasValue is not available within Umbraco

$
0
0

Hi All,

I am currently working on a project and one of the requirements is to have a count 0 to 3 where 3 is the maximum and then account is locked. So 3 attempts and on the 3rd account is locked. I have the failed password attempts working on the backoffice in umbraco but for some reasons it does not let me grab the value of that label. I can only get the name of the lable umbracoFailedPasswordAttempts but not the actual value which is either 0,1,2 or 3. Any ideas? I tried with getType().GetProterty().GetValue() tho it doesn't work. I tried in the razor front-end to set as @if (something) {

@Model.HasValue("variable")

} as one of the documentation I could find. However, that HasValue or HasProperty etc ain't available. I tried to use "using Umbraco.Web;" nope it doesn't help either. I tried on the back end with custom asp.net mvc to get everything available to membership of umbraco, still no success. Any help will be appreciated.

https://our.umbraco.com/Documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Label < for the label I've looked into.

Kind Regards, Val

umbraco 8.5.4 and Azure blob filesystem

$
0
0

Hi all, I've recently tried upgrading my 8.2.2 site to the newest release 8.5.4 this went painlessly however all my azure blob-stored media went 404 on me. I updated UmbracoFileSystemProviders to the new 2.0.0 release version and that's not made a difference. I then tried a new installation of Umbraco 8.5.4 installing azure blob filesystem and that's not worked either

had anyone else managed to get this working?

I created a bug report last week: https://github.com/umbraco-community/UmbracoFileSystemProviders.Azure/issues/161

Thanks!

Grouping by Date when iterating through a list

$
0
0

Hi all, I have a list of child items that i want to iterate through and group by date. However I'm not sure how to compare the dates of the current and next item in the list to do so. Here's what I have so far:

@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var pubsNode = Umbraco.TypedContentAtRoot().First().Children("publicationRecordListing").First();
  }

<h2 class="beta push__bottom">Publications</h2>
@{
    if (pubsNode != null)
    {
        foreach (var item in pubsNode.Children.OrderByDescending(n => n.GetPropertyValue<DateTime>("publicationDate")).Take(3))
        {
            if (!item.GetPropertyValue<bool>("hideFromListings"))
            {
            <a href=">
                <section class="category-item">
                    <h1 class="category-item__title">@item.Name</h1>
                    <div class="category-item__summary">@(item.GetPropertyValue<DateTime>("publicationDate").ToString("dd MMMM yyyy"))</div>

                </section>
            </a>
            }
        }
    }
}

Permissions for data type / dataTypeResource.getPreValues

$
0
0

Hi,

I've created a plugin to show prevalues from a data type on a dashboard. It's all working fine for me (admin), but when an editor tries to view it they get bumped back to the login screen with a 401 error in console (nothing in logs).

If I give the editors group access to the developer section there is no problem, but I don't really want to give all the editors access to the dev section.

I've tried adding

<access>
  <grant>editor</grant>      
</access>

To the dashboard.config file, but that doesn't seem to make a difference.

My plugin controller is:

dataTypeResource.getPreValues("Umbraco.DropDown.Flexible", id).then(function (response) {
    angular.forEach(response[1].value, function (value, key) {
        // DO STUFF
    });
});   

Any ideas on how to do this?

Media filename is renamed on upload

$
0
0

I am in the process of migrating a 4.7.2 website to a new 7.1.4 website. The site is used to distribute software packages and the naming of files is important to them.

Now, in 7.1.4, and probably this was introduced earlier, uploaded files are renamed to web-safe filenames. I do understand the reason for this, but since my customer is very keen on preserving their filenames, is there any way I can avoid Umbraco to rename files on upload?

I've tried to alter the urlReplacing chars in the requestHandler section of umbracoSettings.config, but this does not seem to affect the physical naming of files in the Media section.

Viewing all 72689 articles
Browse latest View live


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