ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

You are not authorized to view this page - On entry save, logged in as Super Admin

October 22, 2012 7:27am

Subscribe [2]
  • #1 / Oct 22, 2012 7:27am

    Stinkotter

    26 posts

    Hey there,

    I’m getting the error: “You are not authorized to view this page” when I want to save an entry, while I’m logged in as Super Admin.. When I check the database I can see that the row in channel_titles is succesfully created, but the one in channel_data is not.

    I’m using EE 2.5.2 and MSM

    The weird thing is that this message only occurs at 1 site, when I try to add an entry to the other 2 sites everything works fine.

    Can someone point me in the right direction? Thanks in advance!

  • #2 / Oct 22, 2012 8:17pm

    Shane Eckert

    7174 posts

    Hello Stinkotter,

    Thank you for posting your question.

    Can you tell me what version of MSM you are using?

    There were over 100 bug fixes in 2.5.3, if it’s possible to upgrade, that would go a long way.

    Thank you,

  • #3 / Oct 23, 2012 5:01am

    Stinkotter

    26 posts

    Hi Shane,

    Thanks for your reply. I’m using EE 2.5.2 with MSM 2.1.3. The weird thing is that it has worked perfectly for the last 3-4 weeks and somehow now doesn’t anymore. Hopefully it is EE/MSM or just some setting causing this and not some add-on.

    Everything is still working on site 1 and 2, not on 3.

    We’ll see if updating EE/MSM fixes the issue

  • #4 / Oct 23, 2012 4:00pm

    Stinkotter

    26 posts

    We’ve updated EE from 2.5.2 to 2.5.3 and MSM from 2.1.3 to 2.1.4.. Unfortunately, the issue isn’t fixed. Any ideas?

  • #5 / Oct 24, 2012 10:22am

    Shane Eckert

    7174 posts

    Hey Stinkotter,

    Did you recently create the site that is giving you issues?

    Have you double checked the file permissions?

    To help us out a bit, can you enable template profiler and debugging? Then go and try to save an entry. Note any errors that are in the header or footer.

    ** To turn debugging on please go to your Control Panel and navigate to Admin->System Administration-> Output and Debugging. Please set the last two settings, which are “Display Output Profiler?” and “Display Template Debugging?”, to yes.

    Thank you,

  • #6 / Oct 29, 2012 4:22am

    Stinkotter

    26 posts

    Hi Shane,

    We’ve created the site a few weeks ago, I think 5-6 weeks ago. You asked if I have double checked the file permissions, which files/folders do you mean by this?

    I’ll enable template profiler and debugger now and get back to you

    Thanks

  • #7 / Oct 29, 2012 4:45am

    Stinkotter

    26 posts

    Ah, now we’re getting somewhere!

    Template profiler and debugger showed nothing, but enabling PHP errors did:

    A Database Error Occurred
    Error Number: 1048
    
    Column 'field_id_180' cannot be null
    
    INSERT INTO `exp_channel_data` (`entry_id`, `channel_id`, `site_id`, `field_id_181`, `field_id_182`, `field_id_180`, `field_ft_180`, `field_ft_181`, `field_ft_182`) VALUES (961, '22', '5', 'test', '
    
    test
    
    \n', NULL, 'none', 'none', 'xhtml')
    Filename: libraries/api/Api_channel_entries.php
    
    Line Number: 1828
    
    « Back

    EDIT: field_id_180 is a custom field for uploading a thumbnail (file field) for an article. I tried editing and re-saving this custom field, but that didn’t help. Should I manually edit the database to allow NULL on field_id_180?

  • #8 / Oct 29, 2012 5:08am

    Stinkotter

    26 posts

    I fixed the bug by manually setting the column field_id_180 to allow NULL in the database. There were also some other custom fields that i’ve set to allow NULL.

    I’m wondering now, how did this happen to the database? I’m guessing that for all custom fields in exp_channel_data NULL should be allowed? The weird thing is that the first few weeks after we developed the new site everything was working correctly, so the database was somehow modified afterwards by using the CP.

    Thanks for your help!

  • #9 / Oct 29, 2012 5:17am

    Stinkotter

    26 posts

    I’ve looked into the fields that didn’t had allow NULL by the way, and they were exactly the custom fields that were added for the new site (by using the duplicate channels function from MSM when you add a new site).. Perhaps a bug in the MSM.. (Wouldn’t explain though why it worked the first few weeks and then suddenly did not)

    Hope this helps!

  • #10 / Oct 30, 2012 11:48am

    Shane Eckert

    7174 posts

    Hey Stinkotter,

    You are right, that does not make sense.

    Please be on the lookout for an email from Ellislab, I would like to get a closer look!

    Cheers,

  • #11 / Nov 05, 2012 5:25am

    Stinkotter

    26 posts

    Hi Shane,

    Do you still need a closer look? We fixed this bug by modifying the database structure (manually set allow NULL on columns in channel_data).

  • #12 / Nov 06, 2012 2:12pm

    Shane Eckert

    7174 posts

    Hey Stinkotter,

    If you are all fixed up, then we can close this out.

    It’s up to you. 😊

    Cheers,

  • #13 / Nov 07, 2012 3:20pm

    Stinkotter

    26 posts

    I’d say no need 😉 thanks for your help!

  • #14 / Nov 07, 2012 4:55pm

    Shane Eckert

    7174 posts

    Hey Stinkotter,

    Awesome! My pleasure!

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases