Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Support: Requests & Feedback

Feature requests; criticism.

Why using pages for BP sections is a bad idea (18 posts)

Started 1 year, 4 months ago by: driz

  • I’ve noticed in the new version of BuddyPress 1.3 that pages will be used to create the sections of the site such as Members, Activity etc. While this may seem super easy for a user to change the urls, it also breaks the rules of good web development. Pages in WordPress are supposed to be static content, they are not supposed to be used to fake sections just to get a pretty url. I much preferred the original and current method of having all the urls and sections built in the code behind as that’s exactly what they were. If anything, an additional settings page should been added to allow users to change the urls in the admin rather than resorting to using pages to deal with it. There was similar problems with custom post types in WP 3.0 whereby a user to create a fake page to show the posts which is now being fixed in the 3.1 release by having an inbuilt index page.

    Think of it this way. Themes are essentially your website, and when a user switches a theme it should reflect as such, so if I switch themes or change plugins the pages I have should reflect, in other words the content shouldn’t be dependant on the theme or plugin. With the new method if a user ditched BP they would have a bunch of fake pages, as they have no content they were used solely to fake the whole url structure which is just bad design.

    I really hope someone on the development team reads and takes notice of this post and that others get involved in this discussion because I think BuddyPress has just been ruined with this new approach, if the WP core team can see and fix the problem why has the BP team gone and made the same mistake they did?

  • Profile picture of Hugo Hugo said 1 year, 4 months ago:

    Interesting points. Working recently with trunk prompted the same thoughts vis-a-vis disabling BP and being left with a heap of odd pages, but then I simply removed or unpublished those pages.

    It would be interesting to hear the comments of the core devs who are :

    @jjj
    @djpaul
    @boonebgorges

  • Yes pages can be deleted, but that’s not the big problem, rather the fact that the plugin uses pages at all to accomplish something so simple. What was wrong with the current system? It’s important to make the software easy, but somethings should be left to the developer of the site and not the admin guy who just writes blog posts, I much preferred changing the URLS in the code behind, but a settings page would be much nicer and slicker than the messy pages.

    Here is another point: The pages don’t add that much flexibility anyway as most of the urls are still coded behind e.g. all the urls inside the members directory such as settings, profiles, followers, etc.

    I think their should be a proper coded page in the plugin somewhere that has the urls in the system where a developer can go and edit to their hearts content to get the system they want. So for example say I didn’t want the members slug on profiles and just wanted: domain.com/driz/activity, using code behind would give true flexibility instead of using the pages which are for static content and NOT url building!

  • Profile picture of Hugo Hugo said 1 year, 4 months ago:

    Not in disagreement necessarily and get your point. I’m interested in this as I don’t know myself why this approach has been adopted (probably should have been paying more attention in those dev chats :( )

  • Profile picture of modemlooper modemlooper said 1 year, 4 months ago:

    Should be post type. Then BP could use post type templates for output. Create a group post type and it will add URL.

  • @modemlooper

    Content types sound interesting as Members, Groups, Forums etc are all types of content. Would be good to hear some input from the main developers and would be good to get this changed before releasing 1.3 and having everyone create fake pages.

  • Profile picture of Travel-Junkie Travel-Junkie said 1 year, 4 months ago:

    I understand the issue, but don’t necessarily find it that much of a problem. Creating a post type just for one page seems to me a bit of overkill, really. Why not just save the ids of the created pages and delete them automatically if BP is getting deactivated?

  • Profile picture of modemlooper modemlooper said 1 year, 4 months ago:

    The reason I suggest something along the lines of post types is to allow adding new “components” so BP would install activity – forums – groups etc content types and then a theme could add it’s own. Allowing more individualized networks. BP could be nothing more than allowing front end editing of post types / components. But this will never happen. From a BP core devs mouth “can of worms”

  • @Travel-Junkie deleting the pages isn’t a problem. Using pages in the first place is the problem. It’s just bad development!

  • Profile picture of Travel-Junkie Travel-Junkie said 1 year, 4 months ago:

    Well, it’s not really rules of web development, it’s more like recommendations and while most of them do make a valid point, it’s wrong to get too hung up about them, if there is a good enough reason to break them. Then it’s not bad development, it’s innovation :)

  • Profile picture of MrMaz MrMaz said 1 year, 4 months ago:

    If you really want to take this where the root of the issue is, the underlying problem is that BuddyPress is actually a theme that has been jammed into the plugin directory and then tightly coupled to what should be multiple plugins (aka components) in one massive package.

    I am starting to feel like the only way to restore any kind of reasonable extensiblity of the BP interface it to split it into a theme, and the components into plugins which all adhere to a very strict API defined by the THEME, not a “core” plugin.

    Of course this would break every existing install. It would have to be an internal fork that was deemed to be the new way forward.

  • @Travel-Junkie I wouldn’t call it innovation. Using pages for such functionality is a hack.

    @MrMaz I like the idea of BuddyPress being split up, but not as a theme, I think it should remain a plugin, but just not so robust.

    The problem the WordPress community is making is trying to make it so that literally anybody can build a website with a click of a button. While this may sound good, it means that we have too much automated crap going on and not enough flexible development. I really dislike that BP can be even added from the directory and has a default theme, it would of been much better manually done as a bunch of code you add to your own theme as the bp-template-pack does, and then the core code as a simple plugin. But that’s beyond the scope of this topic. The main problem at the moment is the whole WP model of using pages to fake stuff, when pages are for static chunks of content and nothing else. BP had it nailed before, we just needed more flexibility in the code behind to mess with the URLs more, the pages actually make it more robust than before as it means admins can mess the site up!

  • Profile picture of Travel-Junkie Travel-Junkie said 1 year, 4 months ago:

    Hmm, humor or sarcasm doesn’t seem to get very far in text. I did include that horrible smiley, though…

  • Profile picture of MrMaz MrMaz said 1 year, 4 months ago:

    @driz

    BuddyPress is already a theme. Look at bp-default. That is a full WP theme that for some reason was bundled with the plugin. There is a huge mess of code devoted to making this setup work. It is nearly impossible to freely modify the templates, even if you roll your own BuddyPress theme, because the javascript is so tightly bound to the ids and classes in the markup.

    I don’t think its reasonable anymore to call BP a plugin, since it does not enhance a WP site in the purest sense. It completely takes it over and defines an entirely new set of rules for how to customize the look of your site. That sounds like a theme to me.

    If you think about BP as a theme, then the only acceptable ways to solve the issue and stay true to WP is pages or custom post types. This only doesn’t make sense though because BP is made up of many components that should be making their OWN decisions about how they get displayed.

    So back to my original point. BP is defining too many rules, and forcing components to adhere to the default theme itself, instead of a theme prototype (which is how WP works). If BP was doing it the “right” way, then this whole issue would be moot, because each component would be deciding how its URL was determined, and the end user could decide if they liked it or not.

    I think this is in the scope of the topic because it gets into defining the problem that needs to be solved, which is important before working on a solution.

  • Profile picture of r-a-y r-a-y said 1 year, 4 months ago:

    MrMaz, the term you’re looking for is “theme framework”. Like Justin Tadlock’s Hybrid or Ian Stewart’s Thematic.

    Your argument is similar to Justin’s blog post on why advanced parent themes are not frameworks:

    http://justintadlock.com/archives/2010/08/16/frameworks-parent-child-and-grandchild-themes