Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tom Engan 430 posts 1173 karma points
    Mar 01, 2018 @ 16:52
    Tom Engan
    0

    Perplex Dashboards: Namespace not found

    I've installed the package from backoffice developer-section, and it seems to work all fine, but I missing Activity Log in Member section since namespace PerplexDashboards can't be found - even when the file PerplexDashboards.dll is in the bin folder.

    When I try to Add Reference in Visual Studio, the PerplexDashboards not showing up, so I can't add these lines in the Surfacecontroller:

    using PerplexDashboards.Models.MemberDashboard;
    using PerplexDashboards.Code;
    

    Umbraco version 7.9.0 assembly: 1.0.6631.28264

    Target Framework: .NET Framework 4.6.1

    How to solve this?

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Mar 02, 2018 @ 08:41
    Daniël Knippers
    0

    Hi Tom,

    You should still be able to add the reference, using Add Reference > Browse and add the DLL from the bin folder. I just tried this in a new 7.9 installation and that works.

    However, the Target Framework for our package itself is 4.7.1. I just tested this, and adding the reference to a project which itself targets a lower framework like 4.6.1 means you cannot build after adding the reference and using it somewhere. Can you try changing the target framework of your project to 4.7.1 to see if it works in that case?

    If that's not an option, I could actually just build our package with the target framework set to 4.6.1 instead. I have uploaded a PerplexDashboards.dll to our package page, which is v1.1.1 with Target Framework set to 4.6.1. Can you try that one as well?

    -- Daniël

  • Tom Engan 430 posts 1173 karma points
    Mar 02, 2018 @ 13:33
    Tom Engan
    0

    I rolled back to Umbraco 7.8.0, reference the solution to Target Framework 4.7.1, and upgraded to Umbraco 7.9.2. Then installed Perplex Dashboards Version 1.1.1.

    This time I referred to PerplexDashboards.dll in the bin directory with browse. I didn't do that last time, since I assumed that all the references should be in the Reference Manager list, so I didn't known that you can browse other files (as in the bin directory) so this thread should probably not been labeled as bug, I think.

    Now it just remains to find the correct codes and the locations of the code lines, for now I was listed member none under the Activity Log in the Member section.

    MemberLogItem.Log(Members.GetCurrentMemberId(), MemberAuditAction.Login);
    
  • Tom Engan 430 posts 1173 karma points
    Mar 02, 2018 @ 14:55
    Tom Engan
    0

    I got Members.GetByEmail(Members.CurrentUserName).Id to work instead of Members.GetCurrentMemberId().

    Login in controller:

    if (Members.Login(model.Username, model.Password))
    {
        MemberLogItem.Log(Members.GetByEmail(Members.CurrentUserName).Id, MemberAuditAction.Login);
    } 
    

    Logout in controller:

    public ActionResult Logout()
    {
        MemberLogItem.Log(Members.GetByEmail(Members.CurrentUserName).Id, MemberAuditAction.Logout);
        Members.Logout();
        return Redirect("/");
    }
    

    If locked out:

    if (Membership.GetUser(model.Username) != null && Membership.GetUser(model.Username).IsLockedOut)
    {
        MemberLogItem.Log(Members.GetByEmail(Members.CurrentUserName).Id, MemberAuditAction.LockedOut);
        return RedirectToCurrentUmbracoPage();
    }
    

    If wrong username or password:

    MemberLogItem.Log(Members.GetByEmail(Members.CurrentUserName).Id, MemberAuditAction.FailedLogin);
    

    And the rest of MemberAuditAction somewhere in other controllers:

    ForgotPasswordRequested = 3,
    ForgotPasswordFinished = 4,
    UpdateAccount = 5,
    UpdatePassword = 6,
    Activated = 8,
    ActivatedByAdministrator = 9,
    Register = 10
    
  • Tom Engan 430 posts 1173 karma points
    Mar 02, 2018 @ 17:36
    Tom Engan
    0

    This worked the last time, but after a new installation, the application doesn't recognize me as a user until after logging in (none). Why?

    enter image description here

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Mar 05, 2018 @ 09:03
    Daniël Knippers
    1

    Hi Tom,

    This seems to be a regression in Umbraco 7.9. We simply store the data of an event that is fired by Umbraco, and I see in 7.9 the LoginSuccess event does not send the UserId correctly anymore for some reason, these screenshots are from 7.7 vs 7.9, where you can see the PerformingUser should be 0 but is set to -1. The Username property is empty in both cases, but that is fine when an ID is provided. Unfortunately I don't have much time currently so will look into this later.

    7.7 7.9

    • Daniël
  • Tom Engan 430 posts 1173 karma points
    Mar 07, 2018 @ 12:35
    Tom Engan
    0

    I've deleted the package and the associated database tables, and installed the package again, but I have no lists of Locked and Unnaproved under Member, even though I know there are members with those statuses. enter image description here enter image description here

    I find Hiker - PerplexDashboards - Locked Members ListView and Hiker - PerplexDashboards - Unapproved Members ListView below Available editors, but how should these be associated with the tabs?

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Mar 07, 2018 @ 12:55
    Daniël Knippers
    1

    Hi Tom,

    This is a known issue, I have added it to the package page now as well. This will be fixed in a future version. For now, simply add a new datatype for each of those under Developer > Data Types (right click -> Create). Names do not matter. The package is looking for datatypes with the aliases but cannot find any. The aliases are

    PerplexDashboards.MemberDashboard.UnapprovedMembersListView

    and

    PerplexDashboards.MemberDashboard.LockedMembersListView

    Regards, Daniël

  • Tom Engan 430 posts 1173 karma points
    Mar 07, 2018 @ 13:48
    Tom Engan
    0

    Yes, there it is, but it doesn't find locked and unapproved members, even though I know they exist, only "No members are locked" and "No members need approval" are written instead of the list that should display these member status in real time.

    Note: I use SQL Compact Edition in this solution.

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Mar 07, 2018 @ 14:44
    Daniël Knippers
    0

    I just tested this in a 7.9.2 installation with a new member, and both lockout and unapproved status seem to work propertly with SQL CE. Are you 100% sure the member is locked out / unapproved? Could you perhaps test by creating a new member as well, cause I don't see anything that's wrong. If you get a console error, please also report it here.

  • Tom Engan 430 posts 1173 karma points
    Mar 07, 2018 @ 14:59
    Tom Engan
    0

    I tried with a new member, with all 4 options (Approved, Locked - true/false), but no difference. Is there any database table I can check for double values, or do you have the SQL statements that will find them? enter image description here

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Mar 07, 2018 @ 15:03
    Daniël Knippers
    0

    Seems we look directly in the cmsPropertyData table and use some unique id for this (I did not create this part of the code), I wonder if this still works if you have a custom member type. Anyway, source is here: https://github.com/PerplexInternetmarketing/PerplexDashboards/tree/master/PerplexDashboards

    Unfortunately I cannot assist much more this week, will probably be sometime next week! I can always rewrite to use the MemberService, this raw SQL was probably done for performance reasons.

  • Tom Engan 430 posts 1173 karma points
    Mar 08, 2018 @ 12:40
    Tom Engan
    0

    Yes MemberService will work, so I can find Not approved and Locked out members with this as I can use in surfacecontrollers to members, but I don't know how to use them in backoffice user section:

    var members = Services.MemberService.GetAllMembers();
    string lockedOutMembers = string.Empty;
    string notApprovedMembers = string.Empty;
    
    foreach (var member in members)
        notApprovedMembers = !member.IsApproved ? notApprovedMembers + member.Name + "<br />" : notApprovedMembers;
    
    foreach (var member in members)
        lockedOutMembers = member.IsLockedOut ? lockedOutMembers + member.Name + "<br />" : lockedOutMembers;
    

    So in the meantime, I added umbracoMemberApproved and umbracoMemberLockedOut to Data Type List View - Members, where members in the list are marked with either 0 or 1 (not approved: 0 - locked out: 1). enter image description here

    Instead of MemberService, it appears that the queries has been made directly to the database as you mentioned:

    https://github.com/PerplexInternetmarketing/PerplexDashboards/blob/master/PerplexDashboards/Models/MemberDashboard/UnapprovedMemberAccount.cs

    https://github.com/PerplexInternetmarketing/PerplexDashboards/blob/master/PerplexDashboards/Models/MemberDashboard/LockedMemberAccount.cs

  • Tom Engan 430 posts 1173 karma points
    Mar 07, 2018 @ 15:12
    Tom Engan
    0

    Thanks for the help anyway. Yes, I have a custom member in this case. I'll see if I find out something, but I'm waiting for you when you have time to go on. This package seems very promising, and I've also seen the link you posted http://downloads.perplex.eu/umbraco/gdpr/members.html, with tab "Members to be deleted", "You can not view this data, because you do not have the appropriate role to view sensitive data ", settings for "Delete member after period after inactivity", Insights etc.

    Is this functionality you plan on next release?

  • Tom Engan 430 posts 1173 karma points
    Mar 14, 2018 @ 12:47
    Tom Engan
    0

    Do you plan to build a function for exporting member data (according to GDPR)?

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Mar 14, 2018 @ 14:09
    Daniël Knippers
    1

    Hi Tom,

    No, not at the moment. This also seems like something for Umbraco to add. We just visualize some data now :)

    -- Daniël

  • Tom Engan 430 posts 1173 karma points
    Mar 15, 2018 @ 10:39
    Tom Engan
    0

    I didn't notice it immediately after upgrading, but now there is a new selection at the top right corner, in the member section that exports memberdata to JSON format . enter image description here

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Apr 04, 2018 @ 08:50
    Daniël Knippers
    1

    Hi Tom,

    Just a heads-up, version 1.2 will use the MemberService now and should work with custom member types as well.

  • Tom Engan 430 posts 1173 karma points
    Apr 04, 2018 @ 10:53
    Tom Engan
    0

    Great. Then I'll test this out as soon as I have the opportunity.

    When I upgrade the package: Must I first uninstall 1.1.1, and then install the new version 1.2.0 of Perplex Dashboards at Umbraco backoffice?

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Apr 04, 2018 @ 10:56
    Daniël Knippers
    1

    You should be able to just install it on top of the older one.

  • Tom Engan 430 posts 1173 karma points
    Apr 05, 2018 @ 11:13
    Tom Engan
    0

    Version 1.1.1 doesn't seems to overwritten, so I uninstalled package version 1.1.1 and deleted the three database tables, but can't delete the four data types.

    When I try to install version 1.2.0, version 1.1.1 showing up before installation.

    How can I start from scratch by installing version 1.2.0?

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Apr 05, 2018 @ 11:37
    Daniël Knippers
    0

    What do you mean with "version 1.1.1 showing up before installation"? If you remove the package + DB tables, and double check that bin\PerplexDashboards.dll + AppPlugins\PerplexDashboards are gone, and you remove PerplexDashboardsMemberDashboard + PerplexDashboards_UserDashboard from config\Dashboard.config the package should be entirely gone. Also remove the item with name "perplexUmbracoUserLog" from the umbracoMigration table. Installing 1.2.0 from that point should work. I'll look into uninstall code that does this automatically at some later point in time :)

  • Tom Engan 430 posts 1173 karma points
    Apr 05, 2018 @ 12:43
    Tom Engan
    0

    Now I checked all this, but my four Data Types are still giving me a databaseerror.

    Can I manually delete these 4 records in table cmsDataType and table umbracoNode, or is there a better way to do this?

    Is there more data to delete, like Lockout Emails text?

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Apr 05, 2018 @ 12:44
    Daniël Knippers
    0

    You cannot delete them from Developer > Datatypes (right-click a datatype, choose Delete) ?

  • Tom Engan 430 posts 1173 karma points
    Apr 05, 2018 @ 12:48
    Tom Engan
    0

    I can't delete them the usual way. This is the message before I try (left click):

    An error occured

    Mapping types: DataTypeDefinition -> IEnumerable 1 Umbraco.Core.Models.DataTypeDefinition -> System.Collections.Generic.IEnumerable 1[[Umbraco.Web.Models.ContentEditing.PreValueFieldDisplay, umbraco, Version=1.0.6634.25796, Culture=neutral, PublicKeyToken=null]]

    Destination path: DataTypeDisplay.PreValues.PreValues

    Source value: Umbraco.Core.Models.DataTypeDefinition

    Exception Details AutoMapper.AutoMapperMappingException:

    Mapping types: DataTypeDefinition -> IEnumerable 1 Umbraco.Core.Models.DataTypeDefinition -> System.Collections.Generic.IEnumerable 1[[Umbraco.Web.Models.ContentEditing.PreValueFieldDisplay, umbraco, Version=1.0.6634.25796, Culture=neutral, PublicKeyToken=null]]

    Destination path: DataTypeDisplay.PreValues.PreValues

    Source value: Umbraco.Core.Models.DataTypeDefinition

  • Tom Engan 430 posts 1173 karma points
    Apr 05, 2018 @ 12:50
    Tom Engan
    0

    Or if I right click the Data Types:

    An error occured The key cannot be deleted. The key to be deleted is already deleted from an index by another concurrent session.

    Exception Details System.Data.SqlServerCe.SqlCeException: The key cannot be deleted. The key to be deleted is already deleted from an index by another concurrent session.

  • Tom Engan 430 posts 1173 karma points
    Apr 05, 2018 @ 13:20
    Tom Engan
    0

    But maybe there is something wrong with my database anyway, since I get the same error when I try to delete content nodes in Recycle Bin..

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Apr 05, 2018 @ 12:57
    Daniël Knippers
    0

    Those are some funky errors, probably fixed after a restart of your site, and otherwise just reinstall everything (I assume this is not a production site?). I cannot reproduce those, I have no issues deleting the datatypes when uninstalling the package.

    I also just released 1.2.1 with some small fixes related to database migrations.

  • Tom Engan 430 posts 1173 karma points
    Apr 06, 2018 @ 10:52
    Tom Engan
    0

    Regarding version 1.2.1:

    When I'm going to install package 1.2.1, I get the correct descriptionenter image description here

    But when I press the green button to install 1.2.1, it shows with text still version 1.1.1.

    Is it only the text that's not updated, so it actually is version 1.2.1 that is being installed? enter image description here

  • Tom Engan 430 posts 1173 karma points
    Apr 05, 2018 @ 13:04
    Tom Engan
    0

    These are the posts I'm tempted to delete since I test Perplex Security and GDPR Package on a page that is not in production, but it's an important copy that I would prefer not to roll back since several other changes have been made since the last copy.

    table cmsDataType

    enter image description here

    table umbracoNode enter image description here

  • Daniël Knippers 109 posts 777 karma points MVP 2x c-trib
    Apr 06, 2018 @ 10:54
    Daniël Knippers
    100

    I don't know about the built-in Umbraco package browser, it seems to be confused :) Just download the zip from https://our.umbraco.org/projects/backoffice-extensions/perplex-security-and-gdpr-package/ and choose "Install local" instead.

  • Tom Engan 430 posts 1173 karma points
    Apr 06, 2018 @ 13:15
    Tom Engan
    0

    By downloading local file, I installed version 1.2.1, and now it seems that everything is working properly. I will test out more with time, so thank you for the follow-up and help along the way.

    I still have some errors with the database, but I've checked that the error was there before this package was installed, so that's another case.

Please Sign in or register to post replies

Write your reply to:

Draft