Serenity: Can't refresh or edit permissions

Created on 13 Mar 2016  Â·  48Comments  Â·  Source: serenity-is/Serenity

So I just created a new project and for some reason I can't edit the permissions. The screen comes up, but when I go to select one of the check boxes, bam. Nothing. Can't select anything and the same goes with the refresh buttons. None of them work. Should I just uninstall the SERENE or what should I do?

All 48 comments

Is it 1.9.20? Probably something broken after SlickGrid update

Let me double check really quick

Yep 1.9.20. How do I fix it?

SlickGrid Version 2.2.20140120

Or can I revert back to the 1.9.19 build until this bug is fixed?

Yes i probably found problem. Releasing 1.9.21 now. Please test and let me know if any problems persist.

Thanks my friend! Testing now.

Are you releasing via NuGet or VISX?

Both but at the moment having difficulty with NuGet too

Waiting for packages to be indexed

Sounds good. I'm sitting on the MSDN site waiting for the version change. I'll update this thread as soon as I test it out.

1.9.21 is out now, should fix problems.

Downloading the VISX file now

Still broken my friend. I created a new project. Straight from start up I went to Roles > Add new role. I created new Role and selected re-fresh. Nothing happened. I refreshed the entire page via browser and my new role appeared. Selected edit permissions and still cannot add anything. It's like the check boxes are there but do not function.

Verified that I am working on v1.9.21.0

UPDATE: I uninstalled the extension and reinstalled it and it's still broken..

UDPATE - 2: As I'm continue to mess around with things I have noticed that you cannot assign roles to members either. Just an FYI

Update - 3: The search feature also does not work on the slickgrid.

packages.config contents:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="bootstrap" version="3.3.6" targetFramework="net45" />
  <package id="EPPlus" version="4.0.5" targetFramework="net45" />
  <package id="FluentMigrator" version="1.6.1" targetFramework="net45" />
  <package id="FluentMigrator.Runner" version="1.6.1" targetFramework="net45" />
  <package id="jQuery" version="2.2.0" targetFramework="net45" />
  <package id="jquery.event.drag" version="2.2.0" targetFramework="net45" />
  <package id="jQuery.UI.Combined" version="1.11.4" targetFramework="net45" />
  <package id="jQuery.Validation" version="1.14.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
  <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
  <package id="Newtonsoft.Json" version="8.0.2" targetFramework="net45" />
  <package id="Select2.js" version="3.5.1" targetFramework="net45" />
  <package id="Serenity.CodeGenerator" version="1.9.21" targetFramework="net45" />
  <package id="Serenity.Core" version="1.9.21" targetFramework="net45" />
  <package id="Serenity.Data" version="1.9.21" targetFramework="net45" />
  <package id="Serenity.Data.Entity" version="1.9.21" targetFramework="net45" />
  <package id="Serenity.Services" version="1.9.21" targetFramework="net45" />
  <package id="Serenity.Web" version="1.9.21" targetFramework="net45" />
  <package id="SlickGrid" version="2.2.20140120" targetFramework="net45" />
  <package id="toastr" version="2.1.1" targetFramework="net45" />
</packages>

Ok will have another look

Thanks!

Problems was due to template still has reference to old SlickGrid package, so it was overriding my customizations. Please try with 1.9.22.

trying now

SUCCESS!!! Thank you @volkanceylan for your quick response to this issue!

You are welcome @wdhodges. Thanks, and sorry for the trouble.

Don't be sorry! It happens! Not to mention you solved a breaking issue
within 10 hours of it being raised. That's astonishing and you should he
proud!

On Mon, Mar 14, 2016, 05:02 Volkan Ceylan [email protected] wrote:

You are welcome @wdhodges https://github.com/wdhodges. Thanks, and
sorry for the trouble.

—
Reply to this email directly or view it on GitHub
https://github.com/volkanceylan/Serenity/issues/403#issuecomment-196211772
.

Thanks, feel better now ;) But still need more tests...

Hi,
I am having the same issue where I cannot "tick" any permissions or even filter. I am using the Multitenancy example and have made sure to update Serenity from NuGet as well as all the parts from the Package Manager Console. Still no luck. Please assist..

Uninstall SlickGrid package, reinstall all other packages. If still not work, copy SlickGrid folder from a new Serene project.

Thanks, I uninstalled SlickGrid and reinstalled Serenity.Web and Serenity.Script. Didn't work, I then copied Slick grid folder from a new project. Didn't work. I then installed SlickGrid again without any luck and then copied the Slickgrid folder from a new project again. The filter is now working but I still cannot check any checkboxes.

Is there any error in console?

Something must be different in your project. Can you use WinMerge to compare script folders?

No, the project compiles and runs without errors. Also, the PM console does not produce an error. It did seem like SlickGrid was not installed as I couldn't uninstall at first. Also, this did work a couple of days ago before I made some small changes to include the Google Places API, I reverted all my custom code and still was not able to check the boxes. I am going to do a WinMerge now and compare a new project.

Is PM console means browser console? There might be some script errors in Chrome console.

image

Can you click link on ss.initClass.onClick and $slickGridOnClick lines and share which lines it fails

Btw, was this a clone of MultiTenancy sample in Github, or you followed tutorial by creating this project manually?

ss.initClass.onClick is the only one that seems to have an error on line 1416
"var item = this.view.rows[row];"

I think somehow you couldn't update to the latest version. NuGet V3 server sometimes causes this. See packages.config file under Serene.Web project. What is Serenity.Web version there?

package id="Serenity.Web" version="1.9.24" targetFramework="net452"

What about the Serenity.Script package? I don't have a this.view.rows in my Serene.Script.js file. It must be this.rows.getDataItem(row). If Serenity.Script is also 1.9.24 try rebuilding Script project, check if your Script.js file changes date etc.

package id="Serenity.Script" version="1.9.24" targetFramework="net20"
I had a look at a new project and saw the this.rows.getDataItem(row). I just changed that one line and can now check permissions. Thanks for the help.

But still its strange, you shouldn't manually do this, in next build it will turn back to old code probably.

It was a clone of the MultiTenancy sample in Github. Should I rather start a new project and make the MultiTenancy changes from there?

I see, rebuilding the serenity.script changes the line back.

Maybe but better you should understand why it still references old version. Maybe Serenity.Script.UI project reference still to an old version. See what is referenced in MultiTenancy.Script.csproj file looking at source.

I have added my own code to the afterLoadEntity function in the Serenity.Script.UI file. Could this cause the file to not update?

Maybe

FYI that I had the same issue. Could only resolve by overwriting the UserPermission cs files in the Script project using a new blank project based on 1.9.24

Oh, now i understand, this line in PermissionCheckEditor:

                var item = this.view.Rows[row];

Should be this:

                var item = Rows[row];

I actually added Obsolete to this and used InlineCode but because of IntrinsicProperty, Saltaralle ignored my InlineCode attribute :(

        [IntrinsicProperty, Obsolete("Use GetItem and GetLength")]
        public new List<TEntity> Rows { [InlineCode("{this}.getRows()")] get { return null; } }

Will be fixed in next version, thanks.

Thanks, that did the trick!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Akarsh03 picture Akarsh03  Â·  3Comments

Amitloh picture Amitloh  Â·  3Comments

StefanTheiner picture StefanTheiner  Â·  3Comments

Pinellus picture Pinellus  Â·  3Comments

stixoffire picture stixoffire  Â·  3Comments