Support » Plugin: Disable Blog » Front redirected to “Hello world!”

  • After activation, the front will redirected to “Hello world!” post.

    If that post deleted, the front page shows “Page not found”.

    Thanks a lot.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Joshua David Nelson

    (@joshuadnelson)

    Hey there,

    In order to have a static front page, you will have to go to Settings > Reading and select a page to act as your front page. If you’re having issues with posts/pages, try deactivating the plugin, setting your static front page, and reactivating the plugin.

    Let me know if there are any other questions or issues!

    Thanks,
    Joshua

    Hi,

    Some setting changed upon activation. Something need to be done to prevent that changes.

    By pressing “Save Changes” after activation in wp-admin/options-reading.php, it will turn it normal again.

    On multisite:
    I’ve also tested on multisite. That problem happen in main site and future subsite (current subsite not affected).

    Since it behave defferently, it is a problem.

    Thanks

    • This reply was modified 1 year, 5 months ago by  berfayvel.
    Plugin Author Joshua David Nelson

    (@joshuadnelson)

    Ah, okay. Another thread reported a similar issue. I will debug this tonight and try to get an update out with a fix asap.

    Thanks,
    Joshua

    Another info if multisite has many subsites (tested with 2 subsites):
    First current subsite affected, while second current subsite not affected.

    Thanks you so much for the quick reply.

    Plugin Author Joshua David Nelson

    (@joshuadnelson)

    berfayvel,

    I appreciate your help in debugging this issue! I’d like to make sure my plugin is working correctly and you’re getting everything you expect out of it. However, after re-reading your replies, I think I need some more clarity on the issue you’re having, your expectations on how it should function and what you’re actually experiencing.

    To clarify: The plugin disables the blog on the front-end by redirecting all blog-related pages (the main blog page, individual post pages, archives, etc) to the static homepage. However, if the static homepage is not selected, it will result in a 404 error. As noted on the main plugin page:

    Important: If Settings > Reading > “Front Page Displays” is not set to show on a page, then this plugin will update it to that option, but you still need to select a page to act as the front page.

    In Settings > Reading, the plugin should change the “Your homepage displays” option from “Your Latest Posts” to “A Static Page,” but it explicitly does not select a page to act as your homepage. It also uses CSS to clean these options up a bit (removing all blog related options from view), so you only have the option of selecting a static page for your homepage and toggling search engine visibility. When I test it, the functionality works as intended and I’m able to select/change the static home page.

    Are you expecting the plugin to select a page to act as a static homepage upon activation? Or are you experiencing something else that I’m not seeing? The other thread I mentioned alluded to some of the options on the Settings > Reading page that should be hidden actually being visible, but I haven’t been able to replicate that issue yet.

    It would be helpful to confirm the version of WordPress and Disable Blog you’re using, too.

    Let me know if I’m missing anything, appreciate the help!

    Thanks,
    Joshua

    Plugin Author Joshua David Nelson

    (@joshuadnelson)

    I would agree that the user experience here isn’t great if you don’t have a static homepage selected. I think adding an admin warning might be a good way to highlight the setting issue, but I’m wary to have the plugin choose a page to act as a homepage.

    I’ll put some work into a better user experience around this static homepage setting regardless, but let me know if you’re trying to highlight a different issue.

    Hi,

    Important: If Settings > Reading > “Front Page Displays” is not set to show on a page, then this plugin will update it to that option, but you still need to select a page to act as the front page.

    Upon activation, this plugin do select A static page (select below). That’s great.

    But strangely it choose blog post as front page which something it should avoid.

    On fresh install without any plugin, if we manually select A static page (select below) and save, it will not behave like that.

    (I’ve tested on both Nginx PHP 7.0 and 5.6 which both gave same result)

    Thanks a lot.

    Plugin Author Joshua David Nelson

    (@joshuadnelson)

    Hey there,

    Sorry to need to clarify this further, but I want to be sure we’re on the same page in terms of the expected behavior.

    If you are running a site with the blog archive as your homepage (the “Your latest posts” default), this is the Reading Settings page before activating the plugin: https://imgur.com/uKWr0SU

    This is the Reading Settings page after activation: https://imgur.com/DjzfI8C. Note that the drop-down is blank. If you view your homepage now, it will still be your blog page, your posts will still be visible. This is the intended behavior.

    You must select a page: https://imgur.com/Rike6nd in order for the plugin to have a page to redirect posts, archives, etc. Without this selected, posts are still visible.

    What would your expected behavior for this plugin to be if there is not a static homepage selected? If the redirect occurs but doesn’t have a static homepage to point to, it will result in a loop or a 404 error – both of which are poor front-end user experiences.

    However, I feel pretty strongly that this option of which page is the static homepage should remain a user choice, not something the plugin sets (it would be difficult to do this, too). The premise of having a WordPress site without a blog requires a static homepage and WordPress core requires the user to select the homepage in this settings page.

    Does that all make sense? I’d value your feedback if you have a different suggestion on how the plugin should redirect blog-related pages when there is not a static homepage selected.

    Let me know if I’m missing something or misunderstanding.

    Thanks,
    Joshua

    Hi,

    On clean install, front page redirected to “Hello World” blog post (not blog posts).

    example.com redirected to example.com/2018/01/27/hello-world/

    IMO, Do nothing is better than redirect to “Hello World”.

    Thx.

    • This reply was modified 1 year, 5 months ago by  rajitrazaki.
    Plugin Author Joshua David Nelson

    (@joshuadnelson)

    Hey there,

    Thanks for the clarification. I wasn’t sure if berfayvel was seeing the Hello World post on the blog page (since it’s the only post) or being redirected to the actual post.

    I agree it should not do any redirects if a static homepage is not set.

    I was able to replicate this issue on a fresh install. I will modify it so that, if no static page is chosen, the plugin doesn’t do any redirects (and figure out why it’s redirecting to a post, which is odd). I’ll also see about adding an admin message, to point users to the Reading Settings page.

    I’m pushing on a project, but I’ll try to get this in an update sometime this week.

    Thanks,
    Joshua

    Plugin Author Joshua David Nelson

    (@joshuadnelson)

    So I’ve dug into this a bit more and here’s the issue: If a static homepage is not already set, the plugin forces the option to be set but doesn’t select a page. However, in order to set the radio option of “Your homepage displays” to “A static page,” there must be a positive integer value (for the page id) of the drop-down option for “Homepage”.

    The plugin explicitly doesn’t choose the page for the user, and I still think that is the correct way to go, but it does set the value to 1 in order to properly save the option for using a static homepage (if it sets it to 0, the static homepage dropdown will grey out and since the “Your Latest Posts” & radio buttons are hidden, the user can’t change it). Negative numbers result in the setting being converted to 1.

    So, if no page is selected for this option it will default to 1. Because “Hello World!” is always id 1, WordPress is actually thinking that the post is the homepage (no redirect by the plugin, it’s the homepage).

    In order to achieve the functionality of the plugin, and keep the blog-related options on this screen hidden, this ended up being the default condition.

    This should be a transitory issue because you need to choose a static homepage if you’re not using posts. The plugin cannot and should not (and never will) choose that page for you.

    I will figure out a more user-friendly way to handle this and push an update. Likely, I’ll leave the entire option (including “Your latest posts”) visible and throw a persistent admin notice telling admin users that in order to disable posts a static homepage must be selected. After the homepage is selected, I’ll have the notice and the rest of the blog-related options on this page go away again.

    Hi,

    I will figure out a more user-friendly way to handle this and push an update. Likely, I’ll leave the entire option (including “Your latest posts”) visible and throw a persistent admin notice telling admin users that in order to disable posts a static homepage must be selected. After the homepage is selected, I’ll have the notice and the rest of the blog-related options on this page go away again.

    I agree with your last paragraph.

    Thx.

    • This reply was modified 1 year, 5 months ago by  rajitrazaki.
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Front redirected to “Hello world!”’ is closed to new replies.