Forums

[resolved] [Plugin: Private Files For Social Privacy] Breaks 404 template display (2 posts)

  1. jivany
    Member
    Posted 1 year ago #

    It appears that this plugin prevents a 404 error page from being displayed to the user.

    Once the plugin is activated, navigating to a non-existent URL will result in a blank page (no content, no markup) being returned to the browser. Deactivating the plugin corrects this issue and a proper 404 page is displayed.

    Of course, the problem is I want the plugin active to protect my uploads directory but I also want proper 404 pages to be displayed to the user outside of the uploads directory.

    Jeff

    http://wordpress.org/extend/plugins/private-files-for-social-privacy/

  2. jivany
    Member
    Posted 1 year ago #

    I spent a couple minutes looking at this and realized that the private_filter function isn't quote correct. It fails to return anything as any good filter function should.

    Here is the end of the function currently (around line 314):

    } else {
    		//user not logged in, do nothing, let normal 404 handling continue
    	}
    }

    It needs to be updated as shown below:

    } else {
    		//user not logged in, do nothing, let normal 404 handling continue
    		return $type;
    	}
    }

    I haven't looked at the other scenarios before this one where there is nothing returned but in my quick tests it appears everything works so far.

    Jeff

Topic Closed

This topic has been closed to new replies.

About this Topic