by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    NimeCloud
    @NimeCloud
    Hi all, I've just asked a question on Stackoverflow about a weird problem: https://stackoverflow.com/questions/60052674/cannot-add-or-modify-datatype-on-modified-c1-cms
    Pauli Østerø
    @burningice2866

    @NimeCloud I'ev answered your question. Its due to C1 still using the old CSharpCodeProvider shipped with .Net Framework while all new C# features from version 6 and onwards is only supported by Roslyn.

    While asp.net has been using Roslyn for a long time now for its website code files by replacing the compiler used in web.config, the change has never been made within C1 CMS itself. This is why your website starts fine using newer C# features in app_code since thats the responsibility of asp.net, but when C1 tries to compile the same files it fails because its using an old version of the compiler.

    Personally i try to avoid C1 compiling any of my code at all by only using static datatypes.

    David Bailey
    @DBailey635

    Is there a way to customise the list of data record values that appear in the DataIdMultiSelector widget? I have a number of data records that have the same primary values, and that are only differentiated by secondary values (Drama - Undergraduate; Drama - Postgraduate; etc), but as currently implemented, these appear as multiple identical records (Drama; Drama) without anything to tell them apart.

    With a Selector widget, I can customise the list with a dictionary<string,string> object. I'd like to do something similar for DataIdMultiSelector. Any suggestions?

    Pauli Østerø
    @burningice2866
    If you use a custom function or static method as the source of items you can built up the list of Key/Value items yourself where Value is the label of each item you manually specify
    David Bailey
    @DBailey635
    I've tried that, but when I click the FUNCTIONS button inside the DataIdMultiSelector, my C# function isn't appearing in the available functions list. I know this is a output type issue, but dictionaries don't work and I can't work out what type to output here instead.
    David Bailey
    @DBailey635
    https://docs.c1.orckestra.com/Data/Customizing-Datatypes/Using-Advanced-Widgets says that the OptionsType field in DataIdMultiSelector has a type of "Type", which I've never come across before.
    Pauli Østerø
    @burningice2866
    Ah, yes, if you use the GUI to configure you're kinda out of luck. In a Razor-function you would do something like this
    @functions
    {
        [FunctionParameter(WidgetFactoryMethod = nameof(MyMultiIdSelector))]
        public IEnumerable<string> MyMultiIds { get; set; }
    
        public static IWidgetFunction MyMultiIdsSelector()
        {
            return StandardWidgetFunctions.DropDownList(typeof(Generator), nameof(Generator.MyMultiIdSelectorOptions), multiSelector: true, required: true).WidgetFunction;
        }
    
        public static class Generator
        {
            public static IDictionary<string, string> MyMultiIdsSelectorOptions()
            {
                return new Dictionary<string, string>();
            }
        }
    }
    David Bailey
    @DBailey635
    Thanks. I was hoping to use it to populate an unlimited length string field in a page datafolder, so the Razor function may not be an option. I might instead have to change the title field I use for subjects to one which is more likely to be unique (in this case, subject code rather than subject title). Do you think it would it be worthwhile my submitting a feature request to allow dictionary list / IEnumerable functions to populate values in the OptionsType field in DataIdMultiSelector?
    Pauli Østerø
    @burningice2866
    Ah, so its for Form Markup?
    David Bailey
    @DBailey635
    Yup.
    David Bailey
    @DBailey635
    I've submitted #722 as a feature request.
    Pauli Østerø
    @burningice2866
    Have you considered using MultiKeySelector and passing in your options via its Option parameter? I use something like this all the time
     <MultiKeySelector Label="Allow" Help="" Required="false" CompactMode="true">
            <MultiKeySelector.SelectedAsString>
              <cms:bind source="AllowedRoles" />
            </MultiKeySelector.SelectedAsString>
    
            <MultiKeySelector.Options>
              <ff:StaticMethodCall Type="System.Web.Security.Roles" Method="GetAllRoles" />
            </MultiKeySelector.Options>
          </MultiKeySelector>
    You can do this as well
    <MultiKeySelector.Options>
        <ff:CompositeFunctionCall Name="123"/>
    </MultiKeySelector.Options>
    Bruce Phillips
    @phillips1021
    We have two websites that are using Composite C1 version 4.3 (March 2015) and we want to update them to the latest version of C1 CMS Foundation.
    The security notice we receive at the /Composite states that we need to upgrade to a version C1 CMS 6.7. Is that the latest version of C1 CMS foundation? Where can I find the release notes? This web page https://c1.orckestra.com/Products/Version-history only has up to C1 CMS 6.5. Has anyone done an upgrade from 4.3 to C1 CMS 6.7 and how did it go?
    Pauli Østerø
    @burningice2866
    You can find newest version and release notes here https://github.com/Orckestra/C1-CMS-Foundation/releases - don't why the main products website isn't up to date.
    Upgrading the CMS itselft from 4.3 and all the way up to 6.8 isn't a problem. Its whatever modules, packages and custom code you have on the websites that is going to determine if the upgrade is going to cause you any trouble.
    Bruce Phillips
    @phillips1021
    Thanks everyone for the replies. I was able to upgrade from 4.3 to 5.0 without an issue. To go upgrade to CMS 6.7 (the next package under available updates) I first had to install .NET 4.7.2 and enable websocket protocol. But then during the package install of 6.7 I got a server error:
    CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=0.2.0.0, Culture=neutral" could not be located
    Any suggestions on how to get past that problem?
    Bruce Phillips
    @phillips1021
    Here is the complete error message I see now when trying to load /composite -

    Server Error in '/' Application.
    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=0.2.0.0, Culture=neutral" could not be located.

    Source Error:

    An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Source File: C:\websites\fammed_rcr_test\web.config Line: 133

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3535.0

    Bruce Phillips
    @phillips1021
    In the main webconfig in the website root is the statement on line 133
    <system.codedom>
    <compilers>
    <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=0.2.0.0, Culture=neutral" warningLevel="4" />
    <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" compilerOptions="/optioninfer+" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <providerOption name="CompilerVersion" value="v4.0" />
    </compiler>
    </compilers>
    </system.codedom>
    What is weird is that the same statement was in the root webconfig before I updated to CMS 6.7:
    <system.codedom>
    <compilers>
    <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=0.2.0.0, Culture=neutral" warningLevel="4"/>
    <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" compilerOptions="/optioninfer+" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <providerOption name="CompilerVersion" value="v4.0"/>
    </compiler>
    </compilers>
    Bruce Phillips
    @phillips1021
    Unable to select a child page in the content tree - when I click on the parent page in the content section tree it shows the child pages but then the cursor changes to a blue circle and I'm unable to select anything
    Ryan
    @rmzeck
    Hello all - I'm looking to add c1 console logging/tracing for users logging in or out of the c1 console, and perhaps what pages they visit or actions they make. Has anyone had any success with implementing this or something similar and can get me pointed in the right direction?
    Ebrahem
    @EbrahemLuhar
    Hi, I'm new to using the CMS and need a little help.
    Does anyone know how to get data from data folders to display as pages that can be linked too, similar to how they do in the Composite Blog?
    Any help would be much appreciated, Thanks.
    Pauli Østerø
    @burningice2866
    @EbrahemLuhar a similar question surfaced almost two years ago, unfortunately not with any outcome really but if you have made ElementProviders for your data you can include them in the Link-dialog selector as shown here https://github.com/Orckestra/C1-CMS-Foundation/issues/605#issuecomment-509324584
    Ebrahem
    @EbrahemLuhar

    @burningice2866 Thanks for getting back to me :)

    I managed to get linking to items of a data folder working (by using page data folders for now) but the links result in a page not found error.

    I am assuming I have to create a page for the data items but I'm not sure how to do this.

    So my question is how do you get data items to display as pages?

    Pauli Østerø
    @burningice2866

    You cant have data items show as pages - there is a clear seperation of Pages - data exposed as urls using its tree-structure as path, and dataitems which don't have a url you can access them by.

    Instead you need a "host" or "container" page to display your data. That is a page with a function on it, or a template containing all the logic, which reads the identifier of the data you want to display from the url, either as querystring parameter or PathInfo, that is what looks like the url continuing after the page.

    http://www.contoso.com/products/123

    • products is your page
    • 123 is what we refer to as pathinfo

    By having a function on your page which reads the pathinfo you can now display a dataitem with the id of 123

    Ebrahem
    @EbrahemLuhar
    @burningice2866 Thanks for the explanation 👍
    Kris Slav
    @slav_kris_twitter
    Hello, I was wondering if anyone knew of a way to export or download all Media files in their original file format? Thanks so much for any help!
    Pauli Østerø
    @burningice2866

    @slav_kris_twitter There is a plugin for it here where you can download either all or a subset of the mediaarchive as a zip-file. It will retain the folder-structure and filenames/format

    https://github.com/burningice2866/CompositeC1Contrib/tree/master/DownloadFoldersAsZip

    Pauli Østerø
    @burningice2866
    I can send you the package for local install if you can't download and build from source
    NimeCloud
    @NimeCloud

    Hi guys, happy corona quarantine days at home! I'm playing with C1 WebApi, by default the output is XML, you can set it as json by adding query parameter like ?type=json or modifying the Startup.cs and adding the line

    GlobalConfiguration.Configuration.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));

    does the job, however the page output content type is text/html -obviously-. Now, how can I set the output json by default and make the output application/json?

    In short I want json output instead of XML :D
    Ryan
    @rmzeck
    Hi, all. Hope everyone is doing well. Is anyone familiar with the purpose of phantomJS.exe and also if it has any bearing on the random files found at: app_data/composite/cache/temp? Just looking for a little insight as to what's going on behind the scenes with these. Thanks in advance.
    Dmitry Dzygin
    @napernik
    @rmzeck PhantomJs is used for rendering function previews in the cms console. It creates some temp files that serve as a browser cache.
    @NimeCloud if I remember correctly, adding an HTTP header "Accept: application/json" to the request should change the response type to JSON.
    Ryan
    @rmzeck
    @napernik thanks for the reply! I'm' wondering if this is a process that would ever run automatically, or is this exclusively triggered by user interaction of some kind? Thanks again.
    Dmitry Dzygin
    @napernik
    @rmzeck there're a few user interactions that trigger it. One is - when you open a page for editing, the template is rendered with PhantomJs to determine the width of every placeholder, the other one - when you edit a page and there's a function in the content, PhantomJs is used for generating a preview image.
    @phillips1021 it is most likely a server side error, can you check the C1 log for related errors?
    NimeCloud
    @NimeCloud
    Composite.Tools.OData source code needs to be modified. I've modded the .cs file and fixed the compile error. Local package is installed on my local project and I could query http://localhost:36859/OData/OData.svc/ in LinqPad 4 however real website https://izsmmmo.org.tr/OData/OData.svc got 404 error. Local version C1 is 6.9.7410.31615, real site is 6.7.7240.24791. Any idea? Plus: Does LinqPad 6 support OData?
    Pauli Østerø
    @burningice2866
    @NimeCloud if you're a fan of LinqPad you should take a look at https://github.com/burningice2866/CompositeC1Contrib.LINQPad. Its a small serverside component and then a driver for LinqPad to query data from a C1 website like it was nomal sql tables
    NimeCloud
    @NimeCloud
    @burningice2866 I couldn't integrate your code into my solution, I'll try later, I'm working with LinqPad 4 locally. BTW I've got another weird problem; I use razor pages as webapi. Razor pages are much elastic, like old ASP days, Response.Write is my best friend with Response.End at the last line. So it's not razor page anymore. I'll use real webapis later. I've mentioned the problem at Stack Overflow: https://stackoverflow.com/questions/61559047/asp-net-response-is-empty-if-i-dont-add-a-space-in-front-of-output?noredirect=1#comment108892178_61559047
    Egide
    @Egide-C
    Hi, i have some trouble using or configuring page comments, the page scope "current page" filter gives me an error. Any advice?
    Without filter, i get all comments on all blog entries, when i use filter, i don't see any comments, get an string type error and all comments fields are missing.
    Volodymyr Muzyka
    @aeont
    Many years ago we were able to integrate nopcommerce with c1.. curious if anyone have any experience and luck with recent versions.
    davodmusa
    @davodmusa
    Hi, I am a newcomer and I want to write a module and installation package in C# for my site. I am looking for training in this field. Thank you for your help.