Skip to:
Content
Pages
Categories
Search
Top
Bottom

Please help to get Permalink work for both BP and Multiuser Blog


  • rosyteddy
    Participant

    @rosyteddy

    WP 4.1.1, BP 2.2.1 – default installs

    define( ‘WP_ALLOW_MULTISITE’, true );
    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, false);
    Registration Settings : Both sites and user accounts can be registered.
    Using default Twenty-Fifteen theme
    Using Apache server

    When an userA registers both a site and account he gets a blog, suppose
    http://localhost/wordpress/userA/
    Now his categories do not work, when http://localhost/wordpress/userA/category/uncategorized/
    or any other category is clicked it gives a “Page not found Error”

    This gets corrected if Permalink Settings is made Default [http://localhost/wordpress/?p=123]
    UserA can now click on ‘uncategorized’ and get to the uncategorized page or any category page properly.

    However now the Buddypress links like Activity, Groups, Members do no work !
    These lead to non-existent or blank pages.
    At this stage admin panel shows “BuddyPress is almost ready. You must update your permalink structure to something other than the default for it to work.”
    If “something other” is now selected BP works fine again BUT the Category links in the sidebar of the userA’s blog fail to work again. This happens for all users and fresh categories added via the admin page do not show up in the theme side-bar.

    There are several threads in wp org forum but are 2 year old or so and some I tried are not working (links here) – may be I have missed, if you know one please post.

    Any permanent solution that will survive future upgrades? What settings do I need to do? Thanks a lot for your help.

Viewing 7 replies - 1 through 7 (of 7 total)

  • danbp
    Moderator

    @danbp

    hi @rosyteddy,
    guess the mytery sit here: http://localhost/wordpress/userA/

    Multisite (subdomain or subdirectory) need that wordpress stays at the site root. At least for a default install.

    SSite: hxxp://my_site.com
    MS: hxxp//my_site.com

    MS subdomain: hxxp//wouah.my_site.com
    MS subdirectory: hxxp//my_site.com/wouah/

    A local install (wamp, mamp or xamp) is mostly in a ‘www’ folder at your hard disk root C://
    (recommended path) Refer to your software documentation for more details about installing Wamp/Mamp/Xamp – at least about localhost in URL. In the latest version (wamp 2.5), this is no more used. In my case, the local URL is http://my_site/wp-admin/….

    C://www represent the private part of the site path. The equivalent of /var/your_account/htdocs/ on a production server.

    The same path scenario goes localy
    C://www/my_site (avoid confusion and don’t use WordPress as site name)
    My_site folder contains all WP directories and files:

    My_site/wp-admin
    My_site/wp-content
    My-site/wp-include
    My_site/wp-config.php and so on…

    At the end of the install, you got a htaccess file containing:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    The important things here are rewrite engine on and rewrite base /, where the slash means “start to manage site URL’s form this point”, which is /…/…/var/your_account/htdocs/<- from here !!!

    Before installing BuddyPress, activate pretty permalinks to what you want, EXCEPT default. Save. I do this before, because WP likes also pretty permalinks, and so i don’t forget to do it after i finished with a BP install.

    Install BP and setup (or at least control if they exist) the choosen component page(s).

    If you do this, you won’t have 404 or other issues, no matter if you use MS or subdirectories or subdomain. WP alone will work, and BP too.

    The most important advice if you want to work localy, is to setup correctly apache (mod_rewrite is not activated for ex.). And if you use it with windows, to double-check anything, including HOST file where you have to declare manually each of your local sites (since wamp 2.4 – don’t remember exactly)

    # localhost name resolution is handled within DNS itself.
    127.0.0.1       localhost
    ::1             localhost
    
    127.0.0.1       my_site
    ::1             my_site
    
    127.0.0.1       my_other_site
    ::1             my_other_site

    rosyteddy
    Participant

    @rosyteddy

    Thanks @danbp for the detail write-up.
    This problem happened with “Categories” only, and nothing else as far as I tested. Not just on localhost, but in live site too which I need to test more.

    I will follow your words.
    One thing if “Before installing BuddyPress, activate pretty permalinks to what you want, EXCEPT default. Save.” is a strict requirement, the BP installer pages should say this, force me to do this before proceeding. Our goal should be solve everything programmatically 🙂
    Still better, WP installer should by default set permalink to such protocol that does not interferes or gets disturbed by BP ( since BP is just no other plugin but an important part of WP family – infact it is one of 3 major-most flavors of WP – WP, WP Multisite, WP+BP)

    Thanks again.


    danbp
    Moderator

    @danbp

    Why should every thing possible to do with WordPress automatically be on ON as soon as BP is used ? There is no obligation to use BP. And there are hundreds of way to use that plugin. As there are also hundreds of ways to use WP.

    Permalinks offers 6 options.
    1 Default value -> means OFF
    2-5: are 4 pre-defined option
    6 your own custom setting !

    Before installing a plugin, users are invited to read documentation. At least, it’s the case for BP.
    Not all WP user are using BP, so i guess enabling some BP specific option will never be part of WP installer. When you buy a TV, you can’t whatch it immediatly. You have to unpack it, and setup some channels yourself. Same thing with WP and plugins.

    since BP is just no other plugin but an important part of WP family I understand your enthousiasm and BP is effectively a plugin from the WP family, but it’s just a plugin. Not more, not less. 😉


    rosyteddy
    Participant

    @rosyteddy

    Hi @danbp Thanks.

    Again when trying with

    WP 4.1.1, BP 2.2.1 – default installs
    define( ‘WP_ALLOW_MULTISITE’, true );
    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, false);
    Registration Settings : Both sites and user accounts can be registered.
    Using default Twenty-Fifteen theme
    Using Apache server

    I found some more things : see this picture

    Now UserA signs up for both account and site.
    When he visits the category “Uncategorized” –> Page not found
    When he creates a post using say, Format: Gallery –> Clicking on ‘Gallery’ : Page not found
    Now if he visits the UserA/wp-admin/options-permalink.php – just visits and does nothing, no saving – all the errors vanish. “Uncategorized”, link “Gallery” everything works.
    Same for user B , user C …
    No idea if this is normal and expected or not.
    I am searching how to do this automatically without the user having to compulsorily visit the Permalinks page. Mind you, the Permalink is already set to ‘Day and name’ – which is not “Default”, thus Permalink is already otherwise okay.

    If any user has time here, can try the above steps to reproduce, and if any clue/remedy can please share. Thanks.


    rosyteddy
    Participant

    @rosyteddy

    This is a WP bug it seems. WP Multisite when enabled causes this. It does not matter whether BP is there or not.
    Is there any ticket for this, some one knows ? Thanks.


    danbp
    Moderator

    @danbp


    rosyteddy
    Participant

    @rosyteddy

    @danbp Thanks
    It seems it has been kept unresolved from WP WP 3.3.1
    which means WP 4.1.1 is not usable for subfolder sites as of now.

    https://core.trac.wordpress.org/ticket/24585
    https://core.trac.wordpress.org/ticket/20171

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Please help to get Permalink work for both BP and Multiuser Blog’ is closed to new replies.
Skip to toolbar