Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 18 19:21
  • May 18 19:21
    bangush starred cloudscribe/NoDb
  • May 18 02:31
  • May 16 17:08
    dependabot[bot] labeled #542
  • May 16 17:08
    dependabot[bot] opened #542
  • May 16 17:08

    dependabot[bot] on npm_and_yarn

    Bump lodash-es from 4.17.11 to … (compare)

  • May 16 17:08
    dependabot[bot] labeled #541
  • May 16 17:08
    dependabot[bot] opened #541
  • May 16 17:08

    dependabot[bot] on npm_and_yarn

    Bump lodash from 4.17.11 to 4.1… (compare)

  • May 12 09:06
  • May 07 02:23
  • Apr 27 13:12
    CrispinF labeled #797
  • Apr 27 13:12
    CrispinF opened #797
  • Apr 27 13:06
    CrispinF closed #680
  • Apr 27 13:04
    CrispinF edited #795
  • Apr 27 13:03
    CrispinF unassigned #759
  • Apr 27 13:03
    CrispinF assigned #759
  • Apr 27 13:03
    CrispinF commented #759
  • Apr 23 15:16
  • Apr 20 18:38

    JimKerslake on net6.0

    net6.0 migration for pgSQL time… (compare)

Perry Raleigh
@PerryRaleigh
Hi @CrispinF , I have not. My mother is in hospice care and I have been focused on her for now. I believe it is an authority issue and need to submit a support ticket with the host to see if there is something I need to do or change in that regard.
Arnold Siboro
@asiboro
How to delete a site in cloudscribe? I can't seem to find a menu for site deletion. BTW, I tried to access https://www.cloudscribe.com to ask this question at the forum, but the site has been inaccessible for quite some time. Is it still online?
Crispin Flower
@CrispinF
hi @asiboro sorry we missed your message for a while - no notification. Are you still having trouble accessing the cloudscribe website? Our monitors show it's been up all along but maybe there are DNS problems. Anyway, to answer your question, deletion of tenant sites is by default not enabled, but you can add this into appsettings
"UIOptions": {
"AllowDeleteChildSites": "true"
},
then you should find you can delete a tenant.
Crispin Flower
@CrispinF
To anyone in Asia who couldn't access cloudscribe.com recently - our apologies, and it's open again now. We tightened things up a little too much after some hacking attempts on our servers, and didn't quite get it right! Do shout here if you cannot reach the site.
Arnold Siboro
@asiboro
@CrispinF Sorry I just noticed this reply and thanks. A week or two ago, it became accessible again. I and a friend tried from different countries but it was inaccessible (it kept loading). Yes we were accessing from two countries in Asia.
@CrispinF Sorry to keep asking here instead of cloudscribe.com's forum because this is just a follow up question: May I know the reason why it is disabled by default?
Abdallah Madi
@abomadi

To anyone in Asia who couldn't access cloudscribe.com recently - our apologies, and it's open again now. We tightened things up a little too much after some hacking attempts on our servers, and didn't quite get it right! Do shout here if you cannot reach the site.

Just noticed your message, would you please elaborate what type of attack it was ? is there any security vulnerability in cloudscribe that requires an fix ?

Crispin Flower
@CrispinF
Hi @abomadi @asiboro it was nothing to do with cloudscribe. We run lots of servers for clients in the VIRTUS datacentre, and when our server guys saw lots of unwanted attention they blocked all access from Asia, forgetting we run some global websites from the same datacentre. I hope it's accessible to everyone since we fine-tuned this, but please shout if not.
@asiboro did you make progress with how to delete a tenant site?
Dangelo
@dangelogonzalezquezada
Good morning everyone. Do you know if is possible to use a JOIN with PagedResult<T> for pagination? I am using a viewmodel, and it only works if I use one entity, but cant do it with joins.
Jim Kerslake
@JimKerslake
Hi @dangelogonzalezquezada No my understanding is that <T> here is any class - most likely the ViewModel that represents one row of the paged data that you want to display. Of course you can query multiple tables in your database using Joins if you need to, but then you would need to map those resultant DbModels back to an instance of the single ViewModel before you can return it to the user interface for display by the cs-pager.
Dangelo
@dangelogonzalezquezada
Thank you Crispin for your time, I will try that.
rickers1
@rickers1
I'm upgrading my cloudscribe from NetCore 2.2 to 3.1. Everything is working except when I try to look at API resources etc I get System.MissingMethodException: Method not found: '!!0 AutoMapper.IMapper.Map(System.Object)'.
at cloudscribe.Core.IdentityServer.EFCore.Mappers.ApiResourceMappers.ToModel(ApiResource entity)
Is it because I use AutoMapper 10 in an included package and cloudscribe uses 8.1.1. Is there a cloudscribe version which uses AutoMapper 10?
Crispin Flower
@CrispinF
@rickers1 are you able to test without the AutoMapper 10 package reference to help identify the issue? We'll look into the version cloudscribe is using and whether that can be easily upgraded.
rickers1
@rickers1
Yes i just finished doing that today. It is definitely the automapper v10. I changed my included package to use 8.1.1 and it works. This is not a sustainable solution for me as it's a utility library used across multiple projects and i don't want to have a different version just for our cloudscribe install. It's used in 6 different packages I'm using in our cloudscribe so if need a different version of each of those.
I'm using the latest cloudscribe packages for netcore 3.1
Crispin Flower
@CrispinF
Thanks for confirming @rickers1 we're looking at either upgrading or removing the AutoMapper dependency in the cloudscribe libraries and will report back soon.
rickers1
@rickers1
@CrispinF Thanks.
Jim Kerslake
@JimKerslake
Hi @rickers1 - just uploaded some new cloudscribe packages which bring the automapper dependency up to v10, and it resolved the issue in our local test instance. I think you'll need: cloudscribe.Core.IdentityServer.EFCore.MSSQL (or whichever database you are using) at version 4.1.1, plus cloudscribe.Core.IdentityServerIntegration at 4.1.1 and cloudscribe.Core.Web at 4.1.2. Hope that helps.
rickers1
@rickers1
@JimKerslake Thanks for that. I'll test it today.
rickers1
@rickers1
Yes that seems to have fixed my problems also. Thanks for the quick response.
Crispin Flower
@CrispinF
@rickers1 thanks for testing and reporting back - glad we could help.
CasualChameleon
@casualchameleon
Hi, I'm having an issue with cloudscribe.web.navigation. The dropdown menu rendered by the Bs4ChildDropdown view for the Navigation component is not being localised using the MenuResources resx - all of the other navs rendered by cloudscribe.web.navigation components are! "User Info", "Change Password", "Two Factor Authentication" and "Personal Data" are not localising in this menu.
I've tried adding new nodes, which are also not localised. I've also moved the nodes out from the 'Manage' node children collection, and they then localise correctly. It seems to only be the Bs4ChildDropdown view that's not working for me.
Any ideas?
CasualChameleon
@casualchameleon

There's some weird markup generated by the component that I can't find the source for on github. The component renders

<ul class="dropdown-menu sm-nowrap" aria-labelledby="dropdown-Manage" id="sm-16171907971046475-1" role="group" aria-hidden="true" aria-expanded="false" style="width: auto; display: none; top: auto; left: 0px; margin-left: -69.9167px; margin-top: 0px; min-width: 10em; max-width: 20em;">
                <li class=""><a class="dropdown-item" href="/manage/userinfo">User Info</a></li>
                <li class=""><a class="dropdown-item" href="/manage/changepassword">Change Password</a></li>
                <li class=""><a class="dropdown-item" href="/manage/twofactorauthentication">Two Factor Authentication</a></li>
                <li class=""><a class="dropdown-item" href="/manage/personaldata">Personal Data</a></li>
    </ul>

but the view for Bs4ChildDropdown should render

<ul class="childtree list-unstyled">

my knowledge of razor components is a bit spotty though so I figure I'm missing something obvious.

latest cloudscribe packages are installed.
Jim Kerslake
@JimKerslake

Hi @casualchameleon
There is another version of Bs4ChildDropdown sitting in here:
https://github.com/cloudscribe/cloudscribe/blob/master/src/cloudscribe.Core.CompiledViews.Bootstrap4/Views/Shared/Components/Navigation/Bs4ChildDropdown.cshtml

Just guessing here - that looks very much more like the thing that is rendering your markup (since partial views can override one another, this one is most likely overriding the one in the Navigation component).

I'm slightly confused that it isn't identical to your quoted markup... something else - maybe Bootstrap - may be tweaking the final rendered result somehow?

But note that this version of the Bs4ChildDropdown does not make use of this:
@inject IStringLocalizer<cloudscribe.Web.Navigation.MenuResources> sr
which might account for your lack of localization, when you compare it to how @sr is used in the version of Bs4ChildDropdown that you were looking at.

You may be able to implement your own local override of this partial view..?
Cheers, Jim

CasualChameleon
@casualchameleon
That looks exactly like what's happening - I should have thought to check the compiled views in cloudscribe.web! I'll override the partial and see if that fixes it. Thanks Jim.
CasualChameleon
@casualchameleon
Worked perfectly. Thanks again Jim.
Jim Kerslake
@JimKerslake
Great - glad it worked @casualchameleon
(my own efforts to override partial views sometimes don't work, for mysterious unknown reasons - probably developer error ! )
timiil
@timiil
hi , newbie to cloudscribe , great project :)
do we have a simple sample about SideNav compoent in NavigationDemo.Web ?
i am only here:
    <div>
        @await Component.InvokeAsync("Navigation", new { viewName = "Bs5SideNav", filterName = "", startingNodeKey= "Home" }) 
    </div>
but no idea how to firgurate out the collpse/toggle the group menu
Jim Kerslake
@JimKerslake

Hi @timiil
Perhaps the best way to understand how the sideNav works is to take a look at how the views for the cloudscribe Administration section are put together.
If you look at any one of those views - e.g.:
https://github.com/cloudscribe/cloudscribe/blob/master/src/cloudscribe.Core.CompiledViews.Bootstrap5/Views/RoleAdmin/RoleMembers.cshtml

...in that view there are SideNav and Toolbar sections that call in partial views AdminSideNav and AdminSideNavToggle
https://github.com/cloudscribe/cloudscribe/blob/master/src/cloudscribe.Core.CompiledViews.Bootstrap5/Views/Shared/AdminSideNavToggle.cshtml

The toggle button in AdminSideNavToggle just does a standard Bootstrap 'collapse' on the nav id #sidenavmenu

Then all of these components are assembled in the master _layout page, which does the actual rendering of the nav:
https://github.com/cloudscribe/cloudscribe/blob/master/src/sourceDev.WebApp/sitefiles/s1/themes/custom1/Shared/_Layout.cshtml

<nav id="sidenavmenu" class=" col col-3 order-1 @sideNavToggleClass">
@RenderSection("SideNav", required: false)
</nav>

(Note the comment in that _layout page about needing to set ViewData["SideNavVisible"] to true.)

So - the chain goes something like this:
_layout page >> renders sections from view >> renders partial views >> renders SideNav view component

Hopefully that should give you something to work from in implementing your own.

timiil
@timiil
thanks deeply for your kindly and detail informations :)
timiil
@timiil
1646792513.png
timiil
@timiil
the major menu entries 'About' , 'Contact', 'Area 51' ... how could them have the collpse/toggle behavior ? i check AdminSideNavToggle seems it is for the how nav bar toggle if i have not missunderstood.
timiil
@timiil
i dont know how to set the ‘TreeNode<NavigationNode>’ to have a QueryString , i read the cloudscribe.Web.Navigation.NavigationViewModel class, public string AdjustUrl(TreeNode<NavigationNode> node) method , not understand how to assige the QueryString
so , i have add a property 'QueryParams' into NavigationNode entity, and then so:
        public string AdjustUrl(TreeNode<NavigationNode> node)
        {
            string urlToUse = string.Empty;
            try
            {
                var routeValues = new Dictionary<string, object>();
                routeValues.Add("area", node.Value.Area);

                if (!string.IsNullOrEmpty(node.Value.QueryParams))      //add
                {
                    var temps = node.Value.QueryParams.Split('&');
                    foreach (var temp in temps)
                    {
                        var words = temp.Split('=');
                        if (words.Length == 2)
                            routeValues.Add((string)words[0], words[1]);

                    }
                }

            ...
that it seems be right to pass the query to the content page, am I missed something ? or may be i could make PR
timiil
@timiil
图片.png
Jim Kerslake
@JimKerslake

Hi @timiil On your first question - Yes, apologies that in my previous reply the AdminSideNavToggle is intended to toggle the whole navigation on and off.
In your case, I see now that you want to collapse sections of the side-nav tree to show/hide child nodes.

When you say:

        @await Component.InvokeAsync("Navigation", new { viewName = "Bs5SideNav", filterName = "", startingNodeKey= "Home" })

then you are telling the component to use this partial view:
https://github.com/cloudscribe/cloudscribe.Web.Navigation/blob/master/src/cloudscribe.Web.Navigation/Views/Shared/Components/Navigation/Bs5SideNav.cshtml
But I can't see any support for show/hide the child nodes in that view, and I don't think we have any other view in that component that supports it.

However you can always specify any partial view that you want like this:

        @await Component.InvokeAsync("Navigation", new { viewName = "Bs5SideNavWithCollapse", filterName = "", startingNodeKey= "Home" })

...and then implement your own Bs5SideNavWithCollapse.cshtml partial view, based on the one above, but adding in some CSS / javascript to do whatever you want. I think your custom view would need to be in (I am guessing...) the folder Views/Shared/Components/Navigation .
See 'How it works' section here
https://www.cloudscribe.com/cloudscribe-web-navigation

Jim Kerslake
@JimKerslake

On your second question - it depends on what you are trying to achieve. If all you want to do is to create a simple side-menu with query strings (with nodes defined in navigation.xml) then you can perhaps just use the URL property like this:

<NavNode key="withquery"
                     url="/overview?abc=123&xyz=99"
                     text="with query">
              <Children> </Children>
 </NavNode>

But maybe that is too simple for your intended use?
Happy to review any PR you might like to contribute.

timiil
@timiil
thanks you very much. i will try to make a collapsible menu function :)
Stefan Kunstmann
@Externaluse
Hi, would anyone know how to get a UserStore injected in a background service? If I get a Scope it is instantiated but the resolved SiteContext is empty.