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

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?


Getting composition information in navigation

$
0
0

Hello,

i have a website that runs with the igloo package. But i have an issue of how to get the composition information in the navigation

i am trying to make a true / false for whether or not to show it as a link to the page. Because some menu parts won't actually need a page behind it.

i am getting the pages like the following: var selection = site.Children().Where(x => x.IsVisible(); and then i foreach through the selection.

For each item in the selection i want to check if the setting withoutLink is available and true. However i don't have any idea how i could get this information from the current item. This setting is created inside a compositions. And the composition is applied to all the document types so that each page has this individual option.

Does anyone has any idea how i could read this information in that foreach statement?

i hope i am clear of what i am trying to do.

Boot failed: Umbraco cannot run. Nucache used by another process

$
0
0

I am hosted on azure and STILL getting this error even with the settings described here:

https://our.umbraco.com/Documentation/Getting-Started/Setup/Server-Setup/azure-web-apps#recommended-configuration

specifically app settings:

<add key="Umbraco.Core.LocalTempStorage" value="EnvironmentTemp" />
<add key="Umbraco.Examine.LuceneDirectoryFactory" value="Examine.LuceneEngine.Directories.SyncTempEnvDirectoryFactory, Examine" />
<add key="WEBSITE_DISABLE_OVERLAPPED_RECYCLING" value="1" />

The app does not scale out (more than one instance).. So i am confused and frustrated as to why this is still happening?

Here is the actual error:

Server Error in '/' Application. Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

-> Umbraco.Core.Exceptions.BootFailedException: Boot failed.

-> System.IO.IOException: The process cannot access the file 'D:\local\Temp\UmbracoData\c5e194110ba468ba2305ef3ad38d9528\NuCache\NuCache.Content.db' because it is being used by another process. at System.IO._Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITYATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at CSharpTest.Net.IO.TransactedCompoundFile..ctor(Options options) at CSharpTest.Net.Storage.BTreeFileStoreV2..ctor(Options options) at CSharpTest.Net.Collections.BPlusTree2.OptionsV2.CreateStorage() at CSharpTest.Net.Collections.BPlusTree2.NodeCacheBase..ctor(BPlusTreeOptions2 options) at CSharpTest.Net.Collections.BPlusTree2.NodeCacheNone..ctor(BPlusTreeOptions2 options) at CSharpTest.Net.Collections.BPlusTree2..ctor(BPlusTreeOptions`2 ioptions) at Umbraco.Web.PublishedCache.NuCache.DataSource.BTree.GetTree(String filepath, Boolean exists) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\DataSource\BTree.cs:line 27 at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.MainDomRegister() in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\PublishedSnapshotService.cs:line 176 at Umbraco.Core.MainDom.Register(Action install, Action release, Int32 weight) in d:\a\1\s\src\Umbraco.Core\MainDom.cs:line 102 at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService..ctor(PublishedSnapshotServiceOptions options, IMainDom mainDom, IRuntimeState runtime, ServiceContext serviceContext, IPublishedContentTypeFactory publishedContentTypeFactory, IdkMap idkMap, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IProfilingLogger logger, IScopeProvider scopeProvider, IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository, IDefaultCultureAccessor defaultCultureAccessor, IDataSource dataSource, IGlobalSettings globalSettings, IEntityXmlSerializer entitySerializer, IPublishedModelFactory publishedModelFactory, UrlSegmentProviderCollection urlSegmentProviders) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\PublishedSnapshotService.cs:line 125 at DynamicMethod(Object[] )

The type or namespace name 'IPublishedContent' could not be found Umbraco 8

$
0
0

I've media picker in Umbraco 8 and I want to display image in my cshtml page.

@inherits Umbraco.Web.Mvc.UmbracoViewPage
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<body>
    <section class="section">
        <div class="page-header-box">
            <img src="images/Leadership.png" />
        </div>
        <div class="ld-content-box gradientbackground">
            <div class="inner-container">
                <h3 class="ip-title">Leadership</h3>
                <ul class="aboutus-leadership-listing">
                    @foreach (var childPage in Model.Children())
                    {
                        <li data-aos="fade-up">
                            <div class="abll-image-box">
                                @{
                                    var leaderImage = childPage.Value<IPublishedContent>("leaderImage");
                                }

enter image description here

But I am getting error :

The type or namespace name 'IPublishedContent' could not be found (are you missing a using directive or an assembly reference?)

I don't it is issue because of Umbraco V8 or is there anything missing?

enter image description here

Help with Linq Query - Select Nested Checkbox items that are checked in another Checkbox list

$
0
0

Hello,

I sure hope someone can help me with this. I've been on it for hours and it's giving me a headache. ...lol

I'm using a checkbox list of Categories which returns the selected items: PortfolioCategoryMenu -> IEnumerable string

I then have a Portfolio which has a nested element (checkbox list): PortfolioCategories -> IEnumerable string

I didn't think it would be this diffiuclt to select items from another list of tiems. In my partial I am trying to select all Portfolios who's checkbox items are in my main Categories checkbox.

enter image description here

Nothing I've tried works...

var portfolios = (portfolioItems.Where(p => p.PortfolioCategories == categories));

or

var portfolios = portfolioItems.Where(p => p.PortfolioCategories.Any() == categories.Any()).ToList();

...or about 5/6 hous of other tries. It seems to be much more difficult because my Portfolios are in a list which has the nested element checkbox list.

Does anyone have this answer?

Many thanks for your time!

Daniel

How to get node content by examine ?

$
0
0

Hi everybody

I am trying to get node by id and i usually get the nodes by umbraco.content(nodeID) but the problem that i cant get an unpublished node bu that is there any way to use examine to get node content by id ?

Additional Details added to Order in Edit-Order.cshtml page

$
0
0

HI again!

I'm trying to add two additional text boxes in the Edit-Order.cshtml:

Courier Name 
Courier Tracking Code

enter image description here

 <tr>
                    <td>
                        Courier Name
                    </td>
                    <td>
                        <input type="text" value="@Model.Properties[ "courier_Name" ]" name="shipping_city" class="orderProperty" />
                    </td>
            </tr>
            <tr>
                <td>
                    Courier Tracking Number
                </td>
                <td>
                    <input type="text" value="@Model.Properties[ "courier_TrackingNumber" ]" name="shipping_city" class="orderProperty" />
                </td>
            </tr>

When saving the order do i have to capture these values and add them to the Order? Not sure where i do this, can someone point me in the right direction.

The idea is once admin has sent the order they can update the order with the tracking number and courier, move it to a new Shipped state which fires off an email to the customer.

That part works fine, however it's not sedning the new properties for Courier Name and Courier Tracking number.

EMH-REDESIGN-003) Solution B) New header and mobile menu incl Solution D) Home page Miscs

$
0
0

Advice please: Our client's youtube embed have stopped working after years of stability.

Looks like our code was never using it's own api key: Something must have changed on google's end or umbraco's end.

  1. Did the app hardcoded in the code "YouTubeHelper.cs" possibly get disabled or hit a quota limit? https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=103677695896

Error in our log files indicated "YouTube Data API v3" may need to be enabled or quota limit increased?

" Google.Apis.Requests.RequestError Access Not Configured. YouTube Data API has not been used in project 103677695896 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=103677695896 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry. [403] "

  1. Trying to get this 2014 package to run under our client's own app key still fails:

    2.1. Is it possible that I need to update & rebuild the source code as YouTubeHelper.cs is hardcoding the app name (_ApplicationName) meaning GetYouTubeService() may be failing authentication? Line 14:

    private const string _ApiKey            = "";
    private const string _ApplicationName   = "YouTube for Umbraco";
    
    /// <summary>
    /// Gets the YouTube Service that we use for all requests
    /// </summary>
    /// <returns></returns>
    public static YouTubeService GetYouTubeService()
    {
        var youTubeService = new YouTubeService(new BaseClientService.Initializer()
        { 
            ApiKey          = WebConfigurationManager.AppSettings["YouTube-Umbraco:ApiKey"] ?? _ApiKey,
            ApplicationName = _ApplicationName
        });
    
        return youTubeService;
    }
    

2.2 Things I've tried: a. Configuring an app for our client:

Enabled the "youtube api v3 api" & generated an app key for it which I've put into Staging. https://console.developers.google.com/apis/credentials?project=my-project-12345678your-own-id-here

b. Enabling domains for our live and staging sites: https://console.developers.google.com/apis/credentials/domainverification?project=my-project-12345678your-own-id-here

b. Adding two keys into our web.config file:

Ta, Nix


Tutorial how to create member login and logout form in Umbraco MVC

Sage Pay VPS Protocol version 2.23 > 3.00

$
0
0

Hi

We've set a Tea Commerce site live, the client is saying that some customers are getting timeouts from Sage Pay.

Sage Pay has said this is due to the VPSProtocol being 2.23 and that they should upgrade to 3.00

Are we able to upgrade to VPSProtocol 3.00? if so can this be done via a setting in the back office of Tea Commerce or do we have to grab the payment provider code and, change manually and compile into a DLL and add to the project?

Anyone else done this? Are there extra settings needed or is it a straight swap?

This link seems to suggest some extra info needs to be sent for version 3.00 - https://www.sagepay.co.uk/support/12/36/upgrading-from-2-23-to-3-00-a-brief-overview

Can I get the ID number in my Excel export from Umbraco Forms?

$
0
0

A couple of questions regarding Umbraco Forms:

  1. The ID number that is generated. Can I get that included in the EXCEL Export?

  2. If not or just if it is easy. Can I store the ID value in a field I have created?

Migrate content & media while preserving nodes id

$
0
0

I have an old site in umbraco 6.2.5 which hasn't been maintened for long time and is basially out of sync. I tried the upgrade several times to different higher versions but so unsuccessfully.

So I think it'll be just easier to import all content via json or so. The only problem is that an import will just create new content and media nodes in the new db while not preserving nodes id.

Is there any way to preserve nodes id? Eg. just copy the database table and somehow update the cache? Or is the structure of nodes different in umbraco 8?

Is there any and what approach to use in such case?

Thanks

Need to be able to select a nucache db file!! URGENT

$
0
0

Hi,

I find myself in a situation where my content person has deleted all of the articles from a new website we're building in Umbraco 8.5.3 ... deleted AND emptied the trashcan. We do NOT have a database backup (yes, I know, huge mistake but here we are).

I think my local instance of the site (which has not been started since before the deletion occurred) still has the content in its nucache db file. I can open this file in a text editor but it's all jacked up.

I found your nucache explorer tool and it's great EXCEPT it only works on the nucache files for the site you're currently running. I need to be able to run a separate site and point the tool to a different nucache db.

Can you help me out? Would it be possible to modify your package to have a file selector?

Or are the command line tools you mention available to the general public?

Thanks!

How to retrieve data for country

$
0
0

Hi

I have two international sites and have set the culture, hostname.

I am storing some data in a database. I know how to retrieve data but how could I ensure I get the data for the correct country?

Thanks

Search field contains html tags

$
0
0

Hi,

I'm trying to render "FileTextContent" of a pdf file in my search results. The content of the pdf includes html tags here and there. Like this:

"Den HTML <script> tag som refererar..."

The script tag in this case is never closed since it's not written to be valid HTML. This causes havoc on the rendered search result page and the html getts messed up.

I've tried making the field as Html.Raw but I'm still getting syntax errors.

@Html.Raw(@item.Fields["FileTextContent"].ToString())

Help would be much appreciated.


Where to add custom redirect

$
0
0

Hi

My Umbraco structure is as follows

Site 1
  Site 1 English
  Site 1 German
Site 2
  Site 2 English
  Site 2 German

I have a third party component which allows me to retrieve the visiting users country and redirect them to their country's site. So if a user visited site 1 and they're from USA I could redirect them to the English version but if the user is from Germany I would like to redirect them to Germany's site.

Where would the appropriate place be to add this code?

Thanks

(Obsolete) Content Picker

$
0
0

According to the following page, Content Picker is Obsolete.

Does that mean there is a new method to use in its place for the latest version of Umbraco? Should I stop using it for newer projects?

Thanks for helping me understand the terminology.

How to display external data in macro partial view

$
0
0

I am completely new to umbraco. I need to provide a macro partial view, which should render external data (that comes from an 3rd party api) in a grid. The external API call should happen in the backend part.

I was already able to create a marco partial view, which is just displaying static text. How can I pass data to the partial view?

I appreciate any kind of help!

Thx in advance!

How to add custom context menu item?

$
0
0

I would like to add a custom menu item and write functionality for that. Is that possible.?
Any help is appreciable

Umbraco 8 Examine Indexes

$
0
0

Anyone got any examples or code i can take a look at for implementing a custom index set / searcher

Viewing all 72689 articles
Browse latest View live