When someone posts a status update the actual status is displayed but where the username and photo should be I get:

[sender_pic]
[user_contextual]

......the status as normal.

If viewing own status's the [user_contextual] displays my username fine but not the picture. If viewing someone elses status I get as above (ie no username or photo)

PLease advise

Comments

nitro23456’s picture

tried everything! still no joy

icecreamyou’s picture

Title: Display Issue - Please help!! » Default Views use broken handlers
Category: support » bug

I don't have time to fix this right now. A couple of the Views handlers are broken. It's easy to avoid the problem though, just edit the view and remove the offending tokens from the Global: Custom field.

eidoscom’s picture

Hi all! This is my first contribution on this project.
@nitro23456: In the statuses default view of user, you can add a new field "User:image". Rearrange the fields to place the new one before the "Global:custom field" and substitute the token "[sender-pic]" by "[picture]" and then it will work.

ruess’s picture

eidoscom - so helpful - thank you!

eidoscom’s picture

Two of the default views are missing some of the handlers. I don't know how to do a patch to apply automatically, but I know the partial solution of this issue

For the fbss_ur_stream:

  1. Identify the file of the view (fbss_user_relationships.views_default.inc): it is in this path: statuses/includes/views/
  2. Cahnge the view name on line 18: Think that is a good idea to change the name of the view to "statuses_ur_stream" but it is not necessary to do it in order to fix nothing.
    $view->name = 'statuses_ur_stream'; substitutes $view->name = 'fbss_ur_stream';
  3. Picture handler
    • Line 96: 'picture' => array( substitutes 'sender_pic' => array(
    • Line 121:'table' => 'users' substitutes 'table' => 'facebook_status',
    • Line 122:'field' => 'picture', substitutes 'field' => 'sender-pic',
    • Line 309:[picture] substitutes [sender_pic]
  4. Problems with "classes" on line 67: It seems that is referencing to a field in the 'statuses' table of the databaes but this field doesn't exist.... I don't know 'classes' meaning .... but if someone know it, seems easy to substitute this field.

The other default statuses views, described on file statuses/includes/views/statuses.views_default.inc there are errors euqal to the '[sender-pic]' described above and can fix easyly.

There are a part of the MySQL query that is:'LEFT JOIN {users} users_user_relationships ON user_relationships.uid = users_user_relationships.uid' that causes an error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_relationships.uid' in 'on clause', but I can't find where to change this...

Hope that it can help to fix this broken handlers.

eidoscom’s picture

Okay ...

I see that nobody take care of this .... someone can show me a link to learn some Git installation, using and configuration in order to do and send a patch to the project please??

Thank you!!

icecreamyou’s picture

eidoscom: Instructions to install git will vary depending on your OS. Here's the Drupal documentation on it: https://drupal.org/node/1010894

Personally, I prefer to use SmartGit for most git-related tasks, and I only use the command-line interface for patching since SmartGit doesn't have great support for that feature. However, once you have git installed, creating a patch is very easy. There are step-by-step instructions at https://drupal.org/project/statuses/git-instructions

eidoscom’s picture

Okay!!

I installed SmartGit.

  1. Opened SmartGit
  2. Selected "Clone existing repository"
  3. Choosed Remote Git and added on Repository URL: http://git.drupal.org/project/statuses.git
  4. Checks the connection and promt me to select a Local Directory where I put the path to the statuses module inside my drupal project, and named project "statuses"
  5. I click finish and then appears some messages that no problem with it but the last line shows an error: "remote HEAD refers to nonexistent ref, unable to checkout"

The result is that there are no files in my local statuses directory so I can't modify or do something with the module :(

Some help?

eidoscom’s picture

I think that the problem is solved!!

I put here my child mistake if can help someone else.

I lack the configuration of username and email to Git. When I configured, go to Branch and select switch to the right branch (7.x-1.x) then press pull and get all the files in my directory ^^.

So I only need to make changes in the code and build a patch.

I will try it.

eidoscom’s picture

I make some changes and now want to export a patch to upload here.... Isaac can you help me doing this in smartGit??

icecreamyou’s picture

SmartGit doesn't really handle patches so you need to do it from the command line. Luckily it's pretty easy, just search for the Git Bash application on Windows (not sure if it's the same on Mac or Linux) and run it. Navigate to the directory with Statuses in it (the "cd" command changes folders, "dir" on windows and "ls" on mac/linux shows everything in a directory) and then run this command:

git diff > [filename].patch

The file [filename].patch will then appear in that directory and you can upload it to drupal.org.

eidoscom’s picture

StatusFileSize
new3.73 KB

So, I prepared a little patch that doesn't slove the problem at all but partially. And upload it in order to determine if the format, and all is good. If all is good i will keep going trying to solve the problem :)

icecreamyou’s picture

The format is correct. :-)

eidoscom’s picture

Nice!!! So I will try to solve the issue and upload the entire patch.

Just a question that is "classes", a field that appears in the views definitions is something that is obsolete or I'm missing something?? Is referencing a field called "classes" in the table "statuses", but this field doesn't exists.

Thanks, so excited because I can contribute ^^

eidoscom’s picture

StatusFileSize
new5.31 KB

Here is all the fields broken handlers changed and working. Hope this can commit.

There are some errors to fix in arguments of default views: something related to the handler 'rels_and_me' that I can found what i have to do with it. I think that the "classes" broken handlers can be deleted since I supose that this handler is obsolete because references to a field named "classes" in table "statuses" that doesn't exists. I think Isaac can tell if I'm in truth with this.

icecreamyou’s picture

The right way to fix this issue is to fix the actual handlers, not to just use other fields that don't throw errors, so the patch in #15 isn't what I'm looking for here. Thanks for the effort though, and sorry for the miscommunication...

mathankumarc’s picture

This issue will be closed when Views handlers broken (still use D6 API) is fixed.

All the broken handlers regarding to statuses will be fixed in Views handlers broken (still use D6 API)

eidoscom’s picture

StatusFileSize
new761 bytes

Okay, I'm not doing it in the correct way.... No matter I will keep trying to contribute here ;)

I found a little mistake (or almost I think so) in statuses.info file where lacks a line referencing to the handler of sender-pic. Just added
files[] = includes/views/handlers/statuses_views_handler_field_sender_pic.inc

When I add this, all sender-pic handlers on views starts to work

Hope this is good :P

eidoscom’s picture

StatusFileSize
new1.37 KB

Added
files[] = includes/views/handlers/statuses_views_handler_field_classes.inc
too

icecreamyou’s picture

Status: Active » Closed (duplicate)

Committed #19 to dev, thanks!

Marking this issue duplicate of #1484278: Views handlers broken (still use D6 API) as the rest of the handlers should be fixed there given the progress already made on patching them.

dzieyzone’s picture

Version: 7.x-1.x-dev » 7.x-1.0-unstable4
Assigned: Unassigned » dzieyzone
Priority: Major » Normal
StatusFileSize
new2.45 KB

Fixed views handlers broken

icecreamyou’s picture

Version: 7.x-1.0-unstable4 » 7.x-1.x-dev
Assigned: dzieyzone » Unassigned
Priority: Normal » Major

@dzieyzone: Of the four changes you made in your patch:

The first is wrong (the module currently checks for user_relationships, not user_relationships_api, which is all it needs for that handler -- although maybe it should be checking for user_relationships_views, but in any case not user_relationships_ui).

The second and third have already been made in dev.

The fourth is specific to your site or maybe the Profile2 module, and is not related to Statuses.

We appreciate your contributions, but please (1) do not draw issues off-topic, especially closed ones, and (2) make sure you are looking at the development build before reporting bugs.