Search

bbPress Showcase » Plugins by _ck_

Cannot edit posts with Post Count Plus on

RSS
  1. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 884

    offline

    Argh. This is very confusing.

    Just to debug, using your localhost copy, can you make the function:

    function post_count_plus_profile_key($keys) {	// inserts post_count into profile without hacking
    global $post_count_plus, $self;
    var_dump ($keys);
    if (empty($self)==true && isset($_GET['tab'])==false && bb_get_location()=="profile-page") {
    	(array) $keys=array_merge(array_slice((array) $keys, 0 , 1), array('post_count' => array(0, __('Posts'))), array_slice((array) $keys,  1));
    var_dump ($keys);
    exit();
    }
    return (array) $keys;
    }

    .
    Then manually go to the page /edit.php?id=443
    (where id # is a valid post)

    In theory, that should still route to topic.php
    If not, it will print out $keys twice.

    There is no way that IF statement should execute on the edit.php page. Unless perhaps bb_get_location is not working properly on your host.

    This is a demo of the bbPress Signatures plugin!
    If you use my plugins, please considering donating to help continue their development.
    Posted 3 years ago #
  2. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 884

    offline

    Oh and another idea. Let's try just return the value without altering it.

    function post_count_plus_profile_key($keys) {	// inserts post_count into profile without hacking
    global $post_count_plus, $self;
    if (empty($self)==true && isset($_GET['tab'])==false && bb_get_location()=="profile-page") {
    }
    return (array) $keys;
    }

    .
    There is no way that function should prevent edit from working as it doesn't change the $keys at all. But see if it still breaks your bbpress or not.

    Posted 3 years ago #
  3. agl666
    agl666

    senior member
    Joined: Aug '08
    Posts: 52

    offline

    1. nothing
    2. nothing

    There is no way that IF statement should execute on the edit.php page. Unless perhaps bb_get_location is not working properly on your host.

    maybe my php_info() is needed?

    Posted 3 years ago #
  4. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 884

    offline

    Yes but with the 2nd method, does the post edit work when insert into profile is turned on? In theory it has to work but I am assuming nothing at this point.

    Posted 3 years ago #
  5. agl666
    agl666

    senior member
    Joined: Aug '08
    Posts: 52

    offline

    no, nothing happens.

    ps. i ask again: is my php_info() is needed?

    Posted 3 years ago #
  6. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 884

    offline

    No I don't need the phpinfo because I wouldn't know what slight difference to look for.

    But I don't understand - does "nothing happens" mean that you are NOT able to edit and you get the redirect to topic? Or it actually is able to edit?

    Posted 3 years ago #
  7. agl666
    agl666

    senior member
    Joined: Aug '08
    Posts: 52

    offline

    nothing means that nothing changed, eg. it's unable to edit post

    Posted 3 years ago #
  8. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 884

    offline

    That's really, really weird.
    How about when it's this simple:

    function post_count_plus_profile_key($keys) {
    return $keys;
    }

    Try that. If that fails, there's something else seriously wrong.

    Posted 3 years ago #
  9. agl666
    agl666

    senior member
    Joined: Aug '08
    Posts: 52

    offline

    I think it's the point from where we had to start. Anyway there's something else seriously wrong as you said: nothing happened.

    ps. but if there's a problem with user profiles, maybe after all problem is wrong conversation?

    Posted 3 years ago #
  10. agl666
    agl666

    senior member
    Joined: Aug '08
    Posts: 52

    offline

    I'm so sorry, but I downloaded plugin again, replaced existing one and... it started to work properly... Sorry for taking such a lot of time from you, _ck_. A thanks for your plugins!

    Posted 3 years ago #

RSS feed for this topic

Post a reply to “Cannot edit posts with Post Count Plus on” »

You must log in to post.

keep _ck_ coding >> donate $5 <<     Theme Switcher:
34 users online from in the past 30 minutes. 12 bots 21 guests 1 members: mccawphoto
143 views today 7,784 yesterday 14,010 peak. Most at once 39 today 63 yesterday 131 peak. Visited today: mccawphoto
2,240 posts in 380 topics over 63 months by 425 of 1,992 members. Latest: shairah27, Augustine01, MichaelGomez