OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.41k stars 2.39k forks source link

No content displayed when setting up with theme recipes #2728

Closed Piedone closed 5 years ago

Piedone commented 5 years ago

On the latest dev (1235deb434f6065b055b8cb956a3cbb56485fa18) this is how it looks after setting up the site with the Agency recipe, no content is displayed:

image

The content is actually properly imported as far as I can tell, e.g.: image

Same with the Blog:

image

Coming Soon looks OK, though there's not much to show any way:

image

No errors in the log, using SQLite. I suspect this has to do something with the templates rather than the recipes.

Skrypt commented 5 years ago

Just tried and can't repro. Can also be related to browser cache or cache... Make sure you have a wwwroot folder in your website project ; else ImageSharp won't be able to create it's image cache.

sebastienros commented 5 years ago

I also tried successfully, after checking out the latest dev, and a git clean -xdf.

Piedone commented 5 years ago

Still the same. This is what I've done:

  1. git clean -xdf

  2. Open solution in VS 15.9.2 (latest as far as I'm concerned).

  3. Make OrchardCore.Cms.Web the startup project.

  4. Right click on solution node in Solution Explorer and Rebuild Solution (I wanted to make sure exactly this happens).

  5. Run Rebuild Solution again after I get some temporary build errors of the "Metadata file 'E:\OrchardCore\src\OrchardCore\OrchardCore\bin\Debug\netstandard2.0\OrchardCore.dll' could not be found OrchardCore.Infrastructure" kind. Build succeeds.

  6. Ctrl + F5 to run with IIS Express.

  7. Site starts in Chrome. I run the setup with the following details: image

  8. I see what's above. Same in Edge just to be sure, but there is no content in the HTML output so that doesn't matter (output below).

Did the same with a new clone to a separate location, same.

Where should I look for the issue?

<!DOCTYPE html>
<!-- saved from url=(0024)https://localhost:44300/ -->
<html lang="en-US"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Orchard Core Dev</title>

    <!-- javascript -->

    <!-- CSS -->

    <!-- Custom fonts for this template -->
    <link href="./Orchard Core Dev_files/css" rel="stylesheet" type="text/css">
    <link href="./Orchard Core Dev_files/css(1)" rel="stylesheet" type="text/css">
    <link href="./Orchard Core Dev_files/css(2)" rel="stylesheet" type="text/css">
    <link href="./Orchard Core Dev_files/css(3)" rel="stylesheet" type="text/css">

<link crossorigin="anonymous" href="./Orchard Core Dev_files/bootstrap.css" integrity="sha384-2QMA5oZ3MEXJddkHyZE/e/C1bd30ZUPdzqHrsaHMP3aGDbPA9yh77XDHXC9Imxw+" rel="stylesheet" type="text/css">
<link crossorigin="anonymous" href="./Orchard Core Dev_files/font-awesome.css" integrity="sha384-FckWOBo7yuyMS7In0aXZ0aoVvnInlnFMwCv77x9sZpFgOonQgnBj1uLwenWVtsEj" rel="stylesheet" type="text/css">
    <!-- Custom styles for this template -->
    <link rel="stylesheet" href="./Orchard Core Dev_files/bootstrap-grid-ext.min.css">
    <link href="./Orchard Core Dev_files/agency.min.css" rel="stylesheet">
</head>
<body id="page-top" dir="">
    <nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark" id="mainNav">
        <div class="container">
            <a class="navbar-brand js-scroll-trigger" href="https://localhost:44300/#page-top">Orchard Core Dev</a>
            <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
                Menu <i class="fa fa-bars"></i>
            </button>
<div class="collapse navbar-collapse" id="navbarResponsive">
    <ul class="navbar-nav text-uppercase ml-auto">
        <li class="nav-item">
    <a class="nav-link js-scroll-trigger" href="https://localhost:44300/#services">Services</a>
</li>
        <li class="nav-item">
    <a class="nav-link js-scroll-trigger" href="https://localhost:44300/#portfolio">Portfolio</a>
</li>
        <li class="nav-item">
    <a class="nav-link js-scroll-trigger" href="https://localhost:44300/#about">About</a>
</li>
        <li class="nav-item">
    <a class="nav-link js-scroll-trigger" href="https://localhost:44300/#team">Team</a>
</li>
        <li class="nav-item">
    <a class="nav-link js-scroll-trigger" href="https://localhost:44300/#contact">Contact</a>
</li>
    </ul>
</div>        </div>
    </nav>
    <div class="container" id="main" style="padding-top: 150px;">

    </div>

<div class="widget-container">

    <div class="widget widget-html-widget">
    <div class="widget-body">

<div class="field field-type-htmlfield field-name-html-widget-content">
    <!-- Footer -->
<footer>
    <div class="container">
        <div class="row">
            <div class="col-md-4">
                <span class="copyright">Copyright © Your Website 2018</span>
            </div>
            <div class="col-md-4">
                <ul class="list-inline social-buttons">
                    <li class="list-inline-item">
                        <a href="https://localhost:44300/#">
                            <i class="fa fa-twitter"></i>
                        </a>
                    </li>
                    <li class="list-inline-item">
                        <a href="https://localhost:44300/#">
                            <i class="fa fa-facebook"></i>
                        </a>
                    </li>
                    <li class="list-inline-item">
                        <a href="https://localhost:44300/#">
                            <i class="fa fa-linkedin"></i>
                        </a>
                    </li>
                </ul>
            </div>
            <div class="col-md-4">
                <ul class="list-inline quicklinks">
                    <li class="list-inline-item">
                        <a href="https://localhost:44300/#">Privacy Policy</a>
                    </li>
                    <li class="list-inline-item">
                        <a href="https://localhost:44300/#">Terms of Use</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</footer>
</div>
    </div>
</div>

</div>
<script crossorigin="anonymous" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" src="./Orchard Core Dev_files/jquery-3.3.1.js.download" type="text/javascript"></script>
<script crossorigin="anonymous" integrity="sha384-AsJUT69WgSCIrLgOnMRkNjLvBl0aoHtB3vBDnAEOKRfxKMm7gvmSTJUZCefoYWdA" src="./Orchard Core Dev_files/popper.js.download" type="text/javascript"></script>
<script crossorigin="anonymous" integrity="sha384-DWBJ4L0qV7ffH95jHsoooM04DWR2qtntWspYadu41Wx5kw6d0Cs7W+7C2v2bh7vX" src="./Orchard Core Dev_files/bootstrap.bundle.js.download" type="text/javascript"></script>
<script src="./Orchard Core Dev_files/jquery.easing.js.download" type="text/javascript"></script>
<script src="./Orchard Core Dev_files/agency.js.download" type="text/javascript"></script>

</body></html>
Skrypt commented 5 years ago

Which version of .NET Core you are running on? I don't get any issue when I'm compiling. I'm on VS 15.9.0 Preview 6.0. Dotnet Core 2.1.500. Also, don't forget to add the proper MyGet feed in VS.

Piedone commented 5 years ago

SDK is 2.1.500, runtime 2.1.6, so latest.

Do you mean https://www.myget.org/F/orchardcore-dev/api/v3/index.json? That's configured in VS as a package source.

The only thing I could find without debugging which might be slightly related to similar issues (but with Razor) is that I have an accented character in my Windows username (Zoltán), which can mess with Razor compilation. But given that otherwise Razor templates work (as do Liquid templates), and other apps, any custom Orchard Core code (and recipe) as well, I'm baffled. I just noticed this by chance.

Basically the whole Content section is not rendered. Which is strange, because with other recipes it is.

Piedone commented 5 years ago

Hmm, it's just the LandingPage content type that doesn't display anything. It's not just BagPart, because if I add an HtmlBody it won't get displayed either. It's not displaying anything with other themes either. It has to do something with the Content__LandingPage template because if I delete that the content item is displayed.

Piedone commented 5 years ago

If I remove the {% zone "Header" %} section from the template it works (with the The Default Theme, it's the same issue with the Agency theme's Content.liquid).

sebastienros commented 5 years ago

Ping me on skype if you want to debug the issue together

Piedone commented 5 years ago

Thanks, will do.

Piedone commented 5 years ago

In the meantime any pointers on where the zone block's execution happens? I see that it's registered in LiquidViewTemplate, but NamedHelperBlock is not the actual implementation. I thought maybe ZoneTagHelper would run for it, but no.

Piedone commented 5 years ago

After debugging it with Sebastien we found that this is caused by some strange difference in how strings are handled under the Hungarian culture (the culture setting of my Windows):

upload

Sebastien is changing such string comparisons to Ordinal in Fluid. Re-opening this to track when the updates arrive into Orchard.

(BTW do you see how my face is blacked out on the screenshot? Interesting feature of something, I guess VS, because I didn't do that.)