-
- 15 Posts
Hello,
I’ve got a big problem with publishing/unpublishing resources:
All resources on my site are accessible for public, even if they’re set ’unpublished’.
I’m quite sure there is some kind of general setting for this, but I couldn’t find any in the system settings or any hints in other forums.
I’m using Revolution 2.0.0-pl.
Can anybody help me out?
Thanks,
ivan
-
- 2,314 Posts
i guess you’re just still logged-in when testing
-
- 15 Posts
Hello,
thank you for your answer.
That was my first thought, I’m not logged in and I cleared the cache...
-
- 24,544 Posts
Try from another browser after clearing the browser cache and cookies.
-
- 15 Posts
Hi Bob,
thanks for your advice.
I actually tried with another browser after clearing the cache and the cookies.
I even tried from another computer without loggin in: The unpublished resources are still accessible.
It’s really strange, especially as noone else seems to have this problem.
-
- 24,544 Posts
Try deleting all the files in core/cache except for index.php.
Have you tried this with more than one unpublished doc?
Have you looked in the DB to make sure that the "published" field for those docs in the modx_site_content table is set to 0?
-
- 24,544 Posts
Quote from: ivan23 at Sep 16, 2010, 09:56 PM
Hello,
I tried all your suggestions, unfortunately it still doesn’t work.
I’ve now written a plugin that checks if the resource is published or not
if(!$modx->documentObject['published'])
I use the plugin on event OnLoadWebDocument.
But I’m not really happy with that solution (although it works), as it shouldn’t be necessary.
Try this snippet (uncached) in one or more of the unpublished documents:
<?php
/* ViewUnpublished snippet */
if ($modx->hasPermission('view_unpublished')) {
return 'YES -- User has view_unpublished permission';
} else {
return 'NO -- User does not have view_unpublished permission';
}
?>
If it returns YES, it may mean that you’ve somehow given "members" that permission, which is part of the standard Administrator policy.
-
- 9 Posts
Hello Bob,
we have the same problem (unpublished resources being visible even if we are logged out).
I installed the ViewUnpublished-Snippet, but it gives the following error-message:
Fatal error: Call to undefined method modUser_mysql::hasPermission() in ...modsnippet/242.include.cache.php on line 9
Fatal error: Undefined class constant ’LOG_LEVEL_ERROR’ in ...error/moderrorhandler.class.php on line 108.
Is there anything I still have to consider to be able to use the snippet?
We use MODx Revolution 2.0.8-pl traditional, the unpublished-problem occurs since several weeks, unfortunately we don’t know if it started with the last update.
We would be very glad to receive further helpful hints!
Thanks,
Inka