Forgive me of this has been addressed before.

I am using Tracker through views.

I'm on Drupal 6.10
PHP 5.2.6
MySQL database 5.0.67
Webserver: Apache/2.2.11 (Unix)

When I click on 'My Recent Posts' I am directed to a url similiar to the following:
http://www.mysite.com/tracker/1

It doesn't work.

Is there anyway to remove 'My Recent Posts' ? Or anyway to fix this?

Thanks in advance
Hilal

Comments

grasmash’s picture

Category: bug » support

I'm also getting a page not found error when trying to access "My recent posts"

The page also provides this error message:

    * warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/paperp2p/public_html/modules/views/includes/view.inc on line 1199.
    * warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /home/paperp2p/public_html/includes/database.mysql.inc on line 321.
    * warning: Illegal offset type in /home/paperp2p/public_html/modules/views/includes/view.inc on line 1203.
    * warning: Illegal offset type in /home/paperp2p/public_html/modules/views/includes/view.inc on line 1238.
    * warning: Illegal offset type in isset or empty in /home/paperp2p/public_html/modules/views/views.module on line 699.

Any suggestions?

HS’s picture

Category: support » bug
grasmash’s picture

I went through the source code and could not figure out where the "My recent posts" tab was created.

However, I came up with a simple workaround that removes the tab from the user's view.

-create a block that is shown only on the "tracker" page. I located mine in the content area so as not to displace any other elements.
-leave the title blank
-in the body of the block, paste:

<script language="javascript">
$(document).ready(function(){
    $("ul.tabs li:eq(1)").css({"display" : "none"});
 });
</script>

-depending on the theme that you're using, you will have to replace ul.tabs li:eq(1) with ul.[list_class_name] li:eq(1) -- the current example works with the deco theme

if you'd rather just remove the that tabs bar altogether, paste this instead:

<script language="javascript">
$(document).ready(function(){
    $("div.content-bar").css({"display" : "none"}); //replace div.content-bar with div.[tabs_class_name]
 });
</script>

This uses jQuery to remove the "My recent posts" tab through the DOM after the page loads. Badabing Bababoom.

HS’s picture

Category: support » bug

Thanks mate for the above but is there a better option than running a script? A long term fix as opposed to a hack?

Surely this is not intended behavior.

dtarc’s picture

subscribing, i'm having the same problem

blackdog’s picture

The problem seem to go away if you disable the core tracker, and then the user argument works aswell.

blackdog’s picture

The problem here seem to be that the default View has the same page path as the core tracker, so when using arguments (tracker/%uid) there's a conflict. If you change the Views page path, everything's fine.

HS’s picture

@blackdog

Thank you for your response.

1. How do you disable core tracker? and how will it help?

2. How will changing the Views page path remove the 'My recent post' tab or make it work?

Thanks in advance!

grasmash’s picture

I think that blackdog is saying that drupal's core tracker module and view's recent posts view both user the path "tracker"

This creates a conflict. So, edit the view that shares the path "tracker" (I've renamed mine to Recent Papers and I don't remember the original name), navigate to the page display, and change the value of path from "tracker" to something else.

HS’s picture

It is a conflict with Drupal's core tracker.

The my recent posts tab is not views generated.

It is core drupal functionality.

Views tracker + Drupal tracker user the same path. For some reason this displays views generated content and also the My recent posts tab from Drupal core.

Change the path in the view to make the tab disappear.

Thanks to everyone who helped!

merlinofchaos’s picture

Status: Active » Fixed

You should either disable tracker.module or disable the tracker view.

HS’s picture

Thanks merlinofchaos. Any drawbacks in uninstalling tracker.module? or any issues leaving both core tracker and views tracker running together?

richguynextdoor’s picture

I had this same problem. The solution that I found was to navigate the views editor. In the list there was a "tracker" view.

When I clicked on the edit option, I then went to the page view and changed the path.

The path was set to "tracker." I just changed it to "recentposts" and everything works fine now.

The tab still exists, and now works properly.

HS’s picture

@richguynextdoor

You will find that the tracker with the 'my recent post' tab is the core tracker and will not pull custom nodetypes assigned by views. For example if you set your views tracker to leave out all updated 'page' content types, it wont show up on the tracker where the tab exists. Because that is the core tracker (/tracker) your views tracker is now located at (/recentposts) and not (/tracker).

Thats the question I raised above, is there a drawback running both the core and views tracker? waste of resources?

b0b’s picture

The Tracker and the tracker View used to work without a conflict so the recent Views update broke this. What was nice about the two working together was I could filter out certain node types from the tracker and still have the "my recent posts" tab.

That will not be possible with either proposed "fix" to this issue. It's either all node types on the tracker with a "my recent posts" tab. Or the ability to control which node types appear in the tracker but no "my recent posts" tab.

HS’s picture

Bob above is correct. They co-existed in harmony until I upgraded. The issue wasn't addressed so I had to turn to the above instructions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

b0b’s picture

Just figured this out... duh, the My Recent Posts tab can be rebuilt with just Views instead of Tracker.

Turned off the Tracker module.

Then I took the Tracker (Recent Posts) view that I had and set-up a second Page in it with an Argument of "Node: User posted or commented" and then added it as a My Recent Posts tab on the Recent Posts page.

antlib’s picture

Hey Bob (and anyone else who might be able to enlighten me!)

I've been trying to create a replacement My Recent Posts by following instructions for the last couple of hours but haven't had much luck. Any chance of providing a little more info?

It would seem also that everytime I add an Argument of "Node: User posted or commented", it changes the Recent Posts tab too. Oh and how do you make the new tab show on the same view as Recent Posts?

Sorry for being a bit thick - I've only been working with Drupal for a few weeks :")
Stan

antlib’s picture

Status: Closed (fixed) » Active
b0b’s picture

Make sure you're creating a second "Page" view for My Recent Posts by using the "Add Display" button on the left. So you'll have two page views, one for Recent Posts and one for My Recent Posts.

When you add the argument for "Node: User posted or commented" to the My Recent Posts page make sure you select "Override" so your not changing the Default Argument also.

And you add it as a tab under "Page Settings" of each page view...

Recent Posts
Path: recent-posts/recent-posts
Menu: Default Menu Tab (weight -10)

My Recent Posts
Path: recent-posts/my-recent-posts
Menu: Menu Tab (weight 1)

venusrising’s picture

I am also getting this issue with views. I am not sure if I need to clone the view OR alter the existing one.

xiaowan’s picture

Thanks, very helpful

Yuki’s picture

Thanks

r_honey’s picture

StatusFileSize
new47.36 KB
new46.93 KB

Hello bob, I tried following your instructions, but all that I could manage was an extra page:

http://example.com/tracker/my-recent-posts

in addition to

http://example.com/tracker

Neither could I get an additional tab on the same page itself, nor does tha page added shows the particular user's posts (instead showing all of them). I am new to Views. So, could you please posts detailed steps as to how I can produce the desired effect (Recent posts with a "My Recent Posts" tab).

I have attached 2 images showing my current settings for the 2 page views.

b0b’s picture

It looks like you're close.

On your "Recent Posts" page remove the argument completely. Only the "My Recent Posts" page should have the "User posted or commented" argument.

Then under the Page Settings section

Recent Posts
------
Path: tracker/recent-posts
------
Menu: Default menu tab (you have "Normal menu entry" selected now)
Title: Recent Posts
Weight: -10
------

My Recent Posts
------
Path: tracker/my-recent-posts
------
Menu: Menu tab
Title: My Recent Posts
Weight: 1
------

r_honey’s picture

StatusFileSize
new58.02 KB
new79.46 KB
new57.83 KB

Thanx for the reply Bob. I got some things working, but some are still stuck. Again there are 3 attachments with this post, Default & the 2 page views.

I was almost about to complain that I am not getting the tabs in the tracker, when I noticed that I also need to specify "Normal menu item" as parent for the Default tab (you cn see this in the second attachment). Specifying this, I now have tabs inside tracker as desired.

But the tab "My Recent Posts" always shows all the posts irrespective of the logged in user. I suspect that I have not specified the argument for "User posted or commented". But I could not find a place also to do so.

Has this anything to do with the Tracker module itself. As mentioned in the posts above, I have disabled the Tracker module, and only using the View to render the tracker.

b0b’s picture

If you go to the "My Recent Posts" views set-up then click on "User posted or commented" under Arguments what are your settings for the argument?

Action to take
"Provide default argument" should be checked

Default argument type
"User ID from logged in user" should be checked

r_honey’s picture

That's it. Everything sorted out. Thanx a ton b0b.

Shai’s picture

Bob, AWESOME!

Tracker should be dropped from core and the Views tracker view could be beefed up a bit with a second tabbed display.

If Tracker is not dropped from core, I do think Views should use a different path for the Views tracker view to prevent the name space collision.

Shai

esmerel’s picture

Status: Active » Closed (fixed)

Looks like people have figured out a solution. If people want some specific features added to views, a new feature request should be opened.

Hanscraft’s picture

Status: Closed (fixed) » Active

Bob's instructions definitely aren't working for me. I cannot get the tabs to show up at all.

My website: http://www.godaisies.com/drupal2/recent-posts

MrGeek’s picture

Version: 6.x-2.3 » 6.x-2.11

Bobs instructions not working for me either - I'm not getting any new tabs to display.

b0b’s picture

Can you provide screen shots of your two tab settings?

MrGeek’s picture

I figured it out after re-reading this thread a dozen times.. had to use "/listname/tab1" and "listname/tab2" for the paths..

iamjon’s picture

Status: Active » Closed (fixed)

Marking this as closed

esbon’s picture

Can someone let me know how to change the filter of the built in tracker to a specif content type?

esbon’s picture

I also figured out how to make the tabs and filters work from the instructions above. Thanks bob! What I need to do is put the my recent posts tab in the user tab, the same way the default tracker does. Please someone help me.

Thanks

b0b’s picture

You basically need to copy the My Recent Posts display and change the Path under Page Settings to "user/%/my-recent-posts".

esbon’s picture

Thanks, it is working now

romancos’s picture

Status: Closed (fixed) » Active

Same here http://4models.info/tracker/1

warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/romancos/public_html/modules/views/includes/view.inc on line 1346.
warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in /home/romancos/public_html/includes/database.mysqli.inc on line 329.
warning: Illegal offset type in /home/romancos/public_html/modules/views/includes/view.inc on line 1350.
warning: Illegal offset type in /home/romancos/public_html/modules/views/includes/view.inc on line 1385.
recoverable fatal error: Object of class stdClass could not be converted to string in /home/romancos/public_html/modules/views/views.module on line 755.
warning: Illegal offset type in isset or empty in /home/romancos/public_html/modules/views/views.module on line 762.

romancos’s picture

Status: Active » Needs review

Well just temporary workaround is to disable tracker view. Now this works...

merlinofchaos’s picture

Status: Needs review » Closed (won't fix)

It's not actually temporary; you can't enable tracker.module if you enable tracker view or vice versa. They don't work together.