Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Pauli Østerø
    @burningice2866

    @jeverdrengen Try checking your log to see if there is any function load errors or compilation errors for your News Function.

    If the function responsible for showing a specific news item fails to initialize, C1 won't run in and there won't be anyone to register the PathInfo and in turn you'll see a 404 error.

    jeverdrengen
    @jeverdrengen
    No such thing. The only thing in the log is: Failed to clean up ghost file 'd:\web\localuser\halsnaesskolen.dk\public_html\App_Data\Composite\DataStores\Composite.Data.Types.IUserConsoleInformation.xml'.
    jeverdrengen
    @jeverdrengen

    I could really need a hint to where I can debug this.

    The Requested URL(pathinfo) inside the console: http://www.halsnaesskolen.dk:80/Forside/Nyheder/c1mode(unpublished)/c1mode(relative)/2018/10/27/Invitation-til-åben-skole
    On the website: http://www.halsnaesskolen.dk:80/Forside/Nyheder/2018/10/27/Invitation-til-åben-skole

    If I edit a news item everything works fine. So the data is there!

    Could it be a folder permissions issue on the server, added by the webhotel?

    jeverdrengen
    @jeverdrengen
    Which file is responsible for rendering news? I hav copied the site to local and it doesn't work. I copy the news to my backup site and it works. So it is not something on the server it must be a code thing. So: Which file is responsible for rendering the news?
    Marcus Wendt
    @mawtex
    @jeverdrengen without log into or console access it's hard to say what the issue is. Can you preview news from within the console? The responsibility of rendering news is with Razor Functions named Composite.News.* (if you use https://c1.orckestra.com/Add-ons/All/Orckestra.News ) - the news function doing the rendering is hosted on a standard CMS page - in your case http://www.halsnaesskolen.dk/Forside/Nyheder - and the news function uses the rest of the path ( /2018/10/27/Invitation-til-åben-skole ) to point to a specific news item.
    jeverdrengen
    @jeverdrengen

    @mawtex I have posted the log in a earlier thread: Failed to clean up ghost file 'd:\web\localuser\halsnaesskolen.dk\public_html\App_Data\Composite\DataStores\Composite.Data.Types.IUserConsoleInformation.xml'

    And it is not possible to preview the news item but it is possible to edit all of them and see the content. And yes it is the standard news function I have installed. It has been working for almost a year.....

    Marcus Wendt
    @mawtex
    @jeverdrengen I'd need to take a look - you can catch me on marcus.wendt AT orckestra DOT com - the above info is not enough for me to figure out what is happening.
    Steve
    @steve-at-industrial
    I have a question about Composite C1. I have recently taken over support for a web site where C1 is installed. I want to make some minor tweaks to some of the pages. Will my changes be lost the next time someone runs C1 on the site or will it respect external edits on the pages on the site?
    Peter Edwards
    @peterpde
    Do you know if you are using a sql datasource or a local xml file datasource?
    Steve
    @steve-at-industrial
    xml i think
    there is no connection string in the web.config
    Peter Edwards
    @peterpde
    When you say "next time someone runs C1" do you mean that you have a developer that might deploy a new version of c1? What exactly do you mean by "next time someone runs c1"?
    Steve
    @steve-at-industrial
    i mean i am just editing the pages using visual studio but my customer may run c1 on the live site via the login page to change some content on the same page
    does C1 editor look at the current page i.e. cshtml file or does it look at it's own internal database of what it thinks the page should look like?
    I am not familiar with how C1 works at all
    Peter Edwards
    @peterpde
    If you make changes to the .cshtml you should be fine, I doubt your users are editing your razor template files. The end user would usually be editing data source data which in your case will be stored in xml files under the xml files app_data/composite/datastores directory. So don't overwrite that.
    Also note that in older versions of composite c1 the connection string was stored in the app_data/composite/composite.config file.
    Steve
    @steve-at-industrial
    do most web developers use c1 to change their razor files or would they do what i am doing and edit them via vs?
    I found that composite.config file you mention above and it doesnt have a sql connection string in it
    Peter Edwards
    @peterpde
    ok, so you are likely using the xml file storage provider. So if your users are editing content on the site they again are likely saving changes to the datastore directory under the app_data/composite folder.
    Steve
    @steve-at-industrial
    thank you for your help Peter
    Peter Edwards
    @peterpde
    no problem
    Christoph Keller
    @ckeller81
    Hey there, I have a small question before I start digging into the C1 source ;) Is there a possibility to change the render-order of the MetaData types on a composition container inside the page editor? I'm currently working with PageTypes containing up to 8 different MetaData types, so this would be great to modify the ordering of these. Thanks in advance and have a great day!
    jeverdrengen
    @jeverdrengen
    Hey there. In the standard Composite.News.NewsLatest I need a little help with the following expression: var news = Data.Get<NewsItem>().Evaluate().Where(n => pageIds.Contains(n.PageId)).OrderByDescending(n => n.Date).Take(Count).ToList();
    It shows the five latest news but sort it wrongly with the last on top and the latest closest to today last. How do i get it to show the five latest sorted by date and the most recent on top?
    If i remove "Descending" in "OrderByDescending" it sorts right but now shows the five oldest.
    Can anyone provide me the right expression?
    Pauli Østerø
    @burningice2866
    @jeverdrengen you can do a second OrderBy call after the Take.
    jeverdrengen
    @jeverdrengen
    @burningice2866 Thnx alot
    jeverdrengen
    @jeverdrengen
    @burningice2866 I can't really get what I want by adding a second OrderBy (maybe i do it wrong), but now it pushes the most recent (which is still later than DateTime.Today()) out of the list and add the ones far in the future. I think what I need is to get this included: n.Date >= DateTime.Now(). I just don't know how. I have never worked with linq before
    So: just to be clear. My goal is to show the latest news with the ones closest to today on top. They should not disappear before their date has passed today. It is completely basic newslist behaviour i think...
    Pauli Østerø
    @burningice2866
    Have you ever fancied querying your datastore from LINQPad? Now you can with this driver and server component https://github.com/burningice2866/CompositeC1Contrib.LINQPad/releases/tag/v1.0.0
    rogro82
    @rogro82
    Does anyone know if its possible to have multiple tree selector? One of my colleagues asked this question with some additional details on a github issue (Orckestra/C1-CMS-Foundation#658), but he has not had any answer and I cant help him with it
    toliphant
    @toliphant
    Any chance that using C1 datatypes does not limit you to only C# 5? We have some controllers in app code that are written in some newer C# syntax but when we try to add/edit any datatypes it complains about it and expects '('. For example , it does not like... if (x == default) {} but rather expects if(x == default(DateTime)) {} and also ListCount = member.MemberList(true)?.Count ?? 0.
    toliphant
    @toliphant
    @mawtex @burningice2866 I posted a question about a week ago in regards to generated data types, I forgot to note that we have a lot of controllers within an App_Code folder. It seems that when adding/updating/deleting datatypes it does a run through of the App_Code folder to see if the datatype that is being updated/removed/added will cause any compilation issues. However when using some newer C# syntax that is valid, it seems to think there is compilation issues within the App_Code folder. Is there a specific version of C# compiler that the Composite.dll is using that is causing this issue. Is there any ways to update that so that it doesn't break with newer C# syntax (C# 7.1+). We have built out a lot of code with this newer syntax and the time to go back through all the code and rewrite everything to a lesser version is going to be too time consuming for our deadline. I did a manual update to the latest version of C1 before we started on this project, so running on 6.6.
    Pauli Østerø
    @burningice2866
    @toliphant i know they issue but unfortunaltely don't know any other workaround than to put your code into a dedicated class library where you can compile the code with the compiler of your choosing.
    Pauli Østerø
    @burningice2866

    If you want to look at upgrading the compiler used by C1 you should take a look at all instances of the CSharpCodeProvider https://github.com/Orckestra/C1-CMS-Foundation/search?q=CSharpCodeProvider&unscoped_q=CSharpCodeProvider

    These should ultimately be changed to use Roslyn - should be enough to change the usages of CSharpCodeProvider to new Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider();

    If you plan at looking to fix/upgrade this it would be nice to add the concrete implemenation to the ServiceLocator like service.AddTransient<CodeDomProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider>(), that way you're always free to change the compiler being used later from site to site
    toliphant
    @toliphant

    @burningice2866 Thanks so much for this. I was talking with another developer I work with about this yesterday and he was able to take the uncompiled composite project and found that it was using an old outdated NuGet package that had been replaced for C# 6.0+.

    He swapped out the old one with the new one and that got me to where it just seems to be blowing up on C# 7.1+ features.
    The .csproj file was so old that it would only open in VS 2015 so he had to rebuild that to even get it to open in VS 2017 so I could actually support C# 7 since
    VS 2015 only goes to C# 6 . The last bit he did was he had to update the Rosyln compiler version for the Web project and tweak a couple of other things (not sure what those were) but we are now able to use generated data types without the CMS blowing up due to language version within App_Code.

    jbert50021
    @jbert50021
    Does anyone know how to alter the sitemap.xml to show a custom data type?
    Pauli Østerø
    @burningice2866

    @jbert50021 is this custom datatype of your a part of your overall navigation and url structure of the website? If so one way is to make the SiteMapProvider, which sitemap.xml is generated from, aware of this datatype and all its urls.

    You do this by implementing ISiteMapPlugin and adding it to the service collection in your ConfireServices method

    jbert50021
    @jbert50021
    @burningice2866 Is there any info on how to use the ISiteMapPlugin? I have been looking over the enhancement request, the docs, etc, but I cannot really find anything that fully explains it.
    Pauli Østerø
    @burningice2866

    For starters, you can see how regular pages are handled by the SiteMapProvider since its written as a plugin as well

    https://github.com/Orckestra/C1-CMS-Foundation/blob/dev/Composite/AspNet/CmsPagesSiteMapPlugin.cs

    Pauli Østerø
    @burningice2866
    If you only need one-way resolving, that is to get nodes into sitemap.xml you can return null from the Find/Get SiteMapNode methods and just implement GetChildNodes
    vishnumediaphone
    @vishnumediaphone
    can you please help me with one doubt regarding c1CMS.
    I have two websites fully developed in C1 CMS
    i want to compile both these website to single website
    is it doable
    Marcus Wendt
    @mawtex
    @vishnumediaphone Take a look at https://c1.orckestra.com/Add-ons/All/Composite.Tools.PackageCreator - this let you "package" things like custom data types and install them on a new website. So the overall strategy is: Package elements from site A, backup site B, install A packages on B.
    Daniel Tucker
    @me_dantuck_twitter

    Hello. I would like to implement PWA features but I have come to the point where I have one last step that needs to be updated in the http response. The Vary header is added with * and I can't find where it is added. Also I have tried to remove it using <remove name="Vary" /> then <add name="Vary" value="Accept-Encoding" />

    Any suggestions?

    Daniel Tucker
    @me_dantuck_twitter
    I guess I will open a support ticket since I am not getting any response here.
    jbert50021
    @jbert50021
    How important is it to use a static method when using an external c# function. I have found that this is causing me problems, and I have found a way to trick the cms to let me do what I want. What sort of issues am I opening myself up to?
    Kt Shulha
    @Kt_Shulha_twitter
    Hi!
    Does anybody know how to change the starting (home) page?
    Currently I have one, but want the other one to be the starting page (without any redirects).
    Marcus Wendt
    @mawtex
    @jbert50021 I haven't used those for quite some time, so details might be a bit vague - but if I remember correctly the function provider only recognizes static methods. But what you do from there should be safe enough, as long as you keep in mind you are in a static context to begin with.
    @Kt_Shulha_twitter If you have multiple homepages (and no hostname binding via the "Hostnames" settings on the System perspective) then the top homepage will be served. You can use the "cut / paste" right click commands on a home page and move one page above another, thus switching which is active by default. Do a "Cut" on the new homepage and then "Paste" on the Websites node, placing your new default page as the top one.
    Kt Shulha
    @Kt_Shulha_twitter
    @mawtex Thanks a lot! Hostnames settings solved the issue.
    sfedor
    @sfedor

    Hi there,

    What is the best way to organize deploying and synchronizing among dev and production server? Sometimes we do first changes (controls, content, add new types and metadata) on the dev server and some times we modify the production one. Is there any pattern or mechanism to synchronize data on both servers?