Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    mwhita
    @mwhita

    I'm having issues adding Google Tag Manager but when I place the code given to me by Google, I get the error: '=' is an unexpected token. The expected token is ';'.
    I am trying to place the code into the Head tag of all pages and I tried this by placing into the "MasterLayout.cshtml" file as well as the "CommonHtmlHead.cshtml" files in the /App-Data/PageTemplates/ folder. My installation is vanilla. Here's the code I got from Google:
    <!-- Google Tag Manager -->

    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-XXXXX');</script>
    <!-- End Google Tag Manager -->

    Giovanni Palmiotto
    @mkultradev:matrix.org
    [m]
    Hi. Does anyone know if a website built C1 CMS can be published or copied to GitHub Pages?
    Dmitry Dzygin
    @napernik

    @mwhita you can try like this: <script>
    // <!--

    (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-XXXXX');

    // -->
    </script>

    Inna Boitsun
    @InnaBoitsun
    @djalfe Hi Allan,
    You can try next solution
    BrowserImage="~/Renderers/ShowMedia.ashx?src=${C1:Data:Temp.Data.Types.ICarouselItemImage:ImageSource}&mw=500"
    Allan Hougaard Kleist
    @djalfe

    Horraaaaiiiiii :-D
    @InnaBoitsun you sav'd my day there, thanks.

    The next questen would be, if there is a attribute link BrowserImage for preview in list and for previewing image in list. Right now both using the same. Where image in list is 300x170 scaled down and crop'd, where previewing is okey

    image.png
    Inna Boitsun
    @InnaBoitsun
    @djalfe sorry, I did not crear understand the question
    Allan Hougaard Kleist
    @djalfe
    @InnaBoitsun sorry about that :-)
    Is there another attribute like BrowserImage, so i can have different imagesources for list browserimage and for item browserimage
    image.png
    Inna Boitsun
    @InnaBoitsun
    @djalfe I don't think so, I know just one
    1 reply
    Allan Hougaard Kleist
    @djalfe
    @InnaBoitsun thats a shame, can se the mediaarchive i doing it right
    image.png
    image.png
    Ryan
    @rmzeck
    Hey all, I'm noticing issues with right click in the c1 console not working on Google Chrome v90 and up. Is anyone else seeing this?
    Allan Hougaard Kleist
    @djalfe
    Jep, just updated from 89 to 90, i also have troubles rightclick. popup on insert in editor do nether working
    Ryan
    @rmzeck
    hopefully there's a workaround, or this is something that can be easily patched with a hotfix. in the meantime firefox seems to be working just fine still.
    Allan Hougaard Kleist
    @djalfe
    Ryan
    @rmzeck
    thank you, friend
    Ryan
    @rmzeck
    Hi All, I'm noticing an issue with Safari v14.1.1 on macOS Big Sur. When viewing pages, the content within the XHTML editors loads inconsistently, often just leaving the editor blank. The editor consistently fails to load when opening the .master pages under Layout. Is anyone else seeing this issue? I'm not seeing any obvious console or C1 log errors.
    Screen Shot 2021-06-07 at 2.45.08 PM.png
    Ebrahem
    @EbrahemLuhar
    Hi, I'm having some issues trying to get blog posts to show in the sitemap.xml. I am using the Blog package and the pages from the website are in the sitemap.xml but no blog posts. Does anyone know how I can get the blog posts to show in the sitemap.xml file? Thanks.
    Pauli Østerø
    @burningice2866

    @EbrahemLuhar sitemap.xml is based on whats in the SiteMapProvider. While C1 out of the box only adds pages to the SiteMapProvider, it is fortunately pluggable and you would only need create a class implementing ISiteMapPlugin to get the blogposts - which are data items, not pages, to show up in the sitemap.xml

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

    1 reply
    I'm at bit puzzled to why the Blog package doesn't already to this - the ISiteMapPlugin has been around for 3 years now. @napernik ??
    NimeCloud
    @NimeCloud
    Hi, it's been long a while and a quick question: Can I combine two fields as one data item and sort it at C1 control panel? I save Name and Surname fields separately and I could only list&sort by Name or Surname field.
    mvoisard
    @mvoisard:matrix.org
    [m]

    I'm currently trying to install the CMS on an Azure app service; I know the steps are at https://docs.c1.orckestra.com/Azure/Deploying-C1-CMS-on-Azure-App-Services. However, I also see a section for installing to the Azure cloud service, as referenced at https://docs.c1.orckestra.com/Azure/Setup. There, you have to download a service package and put the files in your Web root, publish your website from a blob storage to a Web role, upload a certificate, etc. My question is, would I have to do all those steps for my app service? I'm assuming not, since I'm not running a cloud service, but after deploying my app and navigating to the Composite/top.aspx file (let alone any file for the CMS), a 404 error occurs. Is that because I don't have the service package set up, or is it some other error? I can't get any details on the HTTP error. For the article I reference on an Azure app service, there doesn't seem to be any prerequisites for getting the CMS Console to launch (I do happen to have an empty Azure DevOps repository, even though it's not required now), but I'm wondering if the instructions mentioned in the other article are prerequisites needed.

    Whoever replies to this: can we please do a video call here on Element? I view that as being much more interactive and quick in resolving my installation issue(s).

    Ramy
    @elmag7ol
    Hi, I want to ask is it possible to edit a page on the website from a SOAP Request because I want to Edit the page through a n automated service. So how to implement it ?
    10 replies
    NimeCloud
    @NimeCloud
    Can I host mydomain.com/subfolder as subfolder.com without installing another C1? Currently I do redirect subfolder.com > mydomain.com/subfolder.
    1 reply
    NimeCloud
    @NimeCloud

    Another one: What is SF.Snowball.SnowballProgram? I've got zillions of errors at my server log: The sites won't affect at all.

    System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Text.StringBuilder.get_Chars(Int32 index)
    at SF.Snowball.SnowballProgram.find_among_b(Among[] v, Int32 v_size)

    https://i.ibb.co/dfqd9gF/Opera-Anl-k-G-r-nt-2022-01-11-161530-izsmmmo-org-tr.png

    4 replies
    David Bailey
    @DBailey635
    Hello. Does anyone know a way to get an InlineMethodFunction to run with an overflow, so that it can accept either Composite.Data.DataReferenc<> or a GUID input value?
    using System;
    using System.Xml.Linq;
    
    namespace BaileyWeb.University.Data
    {
        public static class InlineMethodFunction
        {
            public static XElement GetCourseById(Composite.Data.DataReference<My.Courses> CourseId)
            {
                Guid CourseIdGuid = new Guid(CourseId.ToString());
                return GetCourseById(CourseIdGuid);
            }
    
            public static XElement GetCourseById(Guid CourseId)
            {
                XElement CoursesList = new XElement("CoursesList");
                [... generate XElement here ...]
                return CoursesList;
            }
        }
    }
    1 reply
    Ramy
    @elmag7ol
    I tried to update the page content thru database level but it is not reflecting in the browser! Is there anything else needs to be updated
    using (DataConnection connection = new DataConnection(PublicationScope.Published, new CultureInfo("en-US")))
                {
                    var contentPage = connection.Get<IPage>().FirstOrDefault(x => x.Id.ToString().ToUpper() == "165F9A24-3202-4235-B80C-686F7E07FDA0");
                    var pageContent = connection.Get<IPagePlaceholderContent>().Where(x =>
                        x.PageId.ToString().ToUpper() == "165F9A24-3202-4235-B80C-686F7E07FDA0").ToList();
                    foreach (var content in pageContent)
                    {
                        if (content.PlaceHolderId == "content")
                        {
                            if (contentPage != null)
                            {
                                contentPage.PublicationStatus = "unpublished";
                                connection.Update(contentPage);
                            }
                            var path = Path.Combine(new Uri(AppDomain.CurrentDomain.BaseDirectory).AbsolutePath, "ContentEn.html");
                            StreamReader reader =
                                new StreamReader(new FileStream(path,FileMode.Open));
    
                            var readContent = reader.ReadToEnd();
                            var newContent = readContent.Replace("$YEAR", "2");
                            content.Content = newContent;
                            connection.Update<IPagePlaceholderContent>(content);
                            if (contentPage != null)
                            {
                                contentPage.PublicationStatus = "published";
                                connection.Update(contentPage);
                            }
                        }
                    }
                }
    David Bailey
    @DBailey635

    I'm trying to update a C1 site from v6.11 to v6.12, but keep getting this error message:

    ```The package did not validate

    The process cannot access the file 'C:\inetpub\C1 Website\Website\bin\Composite.dll'

    The process cannot access the file 'C:\inetpub\C1 Website\Website\bin\Composite.Workflows.dll'```

    Other C1 sites on the same server upgraded without a problem. Any ideas?

    Dmitry Dzygin
    @napernik

    Hi @DBailey635 . I haven't yet figured out the condition under which this issue occurs. I had experienced it only on one of the servers, with 3 websites deployed there.

    A workaround:
    1) take the upgrade package ZIP file, and within the "/install.xml" file - comment out or remove the lines, related to /bin/Composite.dll and /bin/Composite.Workflows.dll files
    2) Install the updated ZIP file in the C1 console (the website will likely crash)
    3) Extract and copy the /bin/Composite.dll and /bin/Composite.Workflows.dll files, from the upgrade package to the website (if the files are locked -> temporary stop the IIS working pool to unlock them)
    4) Run C1 console, check in the logs that the package was installed successfully

    David Bailey
    @DBailey635
    Thanks @napernik . I'll give that a go over the Easter weekend.
    On an unrelated topic... any idea why I'm seeing an advert at login saying "6.7 is here!" in the console for v6.12?
    1 reply
    NimeCloud
    @NimeCloud
    What is the future of C1? I feel that it's a little bit old technology. Can we see an SPA builder in near future?
    SCPCOEXR
    @SCPCOEXR
    Is there a maintenance mode or is it the default.aspx notification when the DB isn't accessible? We are doing an upgrade on SQL and I need to know what will be presented when this happens.
    SCPCOEXR
    @SCPCOEXR
    Nevermind found it
    SCPCOEXR
    @SCPCOEXR
    Just need to slap in my own custom app_offline.htm at the root and that should handle any and all sites hosted with the maintenance window?
    Ryan
    @rmzeck
    Hi All, I'm curious about the ability to configure multi-factor authentication for the c1 admin console. is this supported in any way, or has anyone been able to achieve this? thanks!
    2 replies
    NimeCloud
    @NimeCloud

    You may use your custom login form/pages. Add your extra check ie SMS. Below is the C1 default login process:

    var loginResult = Composite.C1Console.Security.UserValidationFacade.FormValidateUser(user, pass);
    if LoginResult.Success Response.Redirect(redirect);

    2 replies
    Ebrahem
    @EbrahemLuhar
    Hi All, I am having an issue with the font that is displayed when adding functions to a page. They are all displaying in the Times New Roman font when editing a page, but the correct custom font is displaying when I preview or view a published page. Does anyone know how I can change the font in the function previews? Thanks.
    Jon Box
    @jonboxkc

    Hi! has anyone else had problems with the vimeo add-on not recognizing valid vimeo URLs?

    links in this format work: https://vimeo.com/253989945
    links in this format do not: https://vimeo.com/700560929/5d7f2fd126

    :(

    NimeCloud
    @NimeCloud
    IMHO C1 is dead and dotnet 4.8 is the tombstone. RIP
    Pauli Østerø
    @burningice2866
    @NimeCloud yeah, unfortunately the effort to rewrite the Console never gained any momentum so we are still stuck being on .Net Full Framework. While its still usable i can't see how one can justify to base any new projects on it.
    NimeCloud
    @NimeCloud
    @burningice2866 I love it's built-in db designer & code generator &&&& very portable and fast in-memory xml db, that's why I want to stick with it.
    Pauli Østerø
    @burningice2866
    @NimeCloud I hear you and i agree. One could be tempted to fork that part of the code base into a seperate project. Truth be told, when working on C1 solutions that are mainly datadriven i rarely use the Console at all - its all about the datalayer and C1 Functions.
    Ryan
    @rmzeck
    does anyone use the profile function with the most updated version targeting the most updated version of jquery? Noticing broken functionality when doing this, but need the latest jquery version for pci compliance.
    Kevin Le Fevre
    @kzlefevre
    is there a way to search within the C1 CMS for specific words or snippets of code (like every page that contains "href='/contact' " or something like "pillows") and have it show a list of content pages that contain that?
    tatiweb
    @tatiweb
    Hi, Is there a developer who works in the Netherlands here?
    MarcoDieleman
    @MarcoDieleman
    @tatiweb Yes, we develop C1 websites and are from The Netherlands.