I have added a new entity claim along with fields. I went to test it as a different user on one of the nodes and everything appeared to work but it is not showing up on Content > Claims admin/content/claims. I went back to try and claim it again but now it says You have already claimed for ...
Am I missing something?

Comments

freshpage created an issue. See original summary.

nikunjkotecha’s picture

Status: Active » Postponed (maintainer needs more info)

Hi freshpage, can you add more information for this? may be screenshot or exported feature of your configuration to try and check? Flow you mentioned seems to be perfectly fine for me.

monstrfolk’s picture

same problem.

monstrfolk’s picture

Title: Claims not showing up » Pending claims not showing up
monstrfolk’s picture

Title: Pending claims not showing up » Pending claims not showing up in admin
monstrfolk’s picture

StatusFileSize
new1.03 KB

The problem is the $arg variable in the menu callback.

In entity_claim.module file...
menu callback for the default claim admin page (pending claims) - no page argument set.

  $items['admin/content/claims'] = array(
    'title' => 'Claims',
    'description' => 'List claims and the claim approval queue.',
    'page callback' => 'entity_claim_content',
    'access arguments' => array('moderate entity_claim'),
    'file' => 'includes/entity_claim.content.inc',
    'type' => MENU_LOCAL_TASK | MENU_NORMAL_ITEM,
  );

In entity_claim_content.inc file....
default $type is pending but the system (drupal) is setting 'node_admin_content' as the page argument by default.

function entity_claim_content($type = 'pending')

So $type can never be set to pending because the entity_claim_content function is called with 'node_admin_content'.

Patch fixes this problem.

monstrfolk’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community
miteshmap’s picture

Status: Reviewed & tested by the community » Active

@monstrfolk: I didn't understand the issue here. We defined a menu item here.
$items['admin/content/claims']
Given a specific page callback for this menu item
'page callback' => 'entity_claim_content', Right?

If I do not pass the page argument, and default value is not pass to the page callback function, That will give me notice of undefined argument.
So, How could this menu item can call node_admin_content as default page argument?

monstrfolk’s picture

node_admin_content is being passed to entity_claim_content not from entity_claim_menu function, but from some other function. I don't know what, but I do know that by setting page arguments' => array('pending'), in entity_claim_menu enforces that entity_claim_content will never be passed an unwanted value overriding the desired default value.

monstrfolk’s picture

@miteshmap... were you able to look at this issue?

monstrfolk’s picture

StatusFileSize
new17.45 KB
new19.98 KB

I have reverted this patch. Attached are two pictures. One is a dpm in the code and the other is the output of dpm.

monstrfolk’s picture

StatusFileSize
new1.26 KB

My last patch did not assign 'pending' when viewing admin/content/pending page. New patch corrects this. This works and solves the issue. I have double and tripled checked this solution and it works.

monstrfolk’s picture

Status: Active » Needs review
nikunjkotecha’s picture

Assigned: Unassigned » nikunjkotecha

  • nikunjkotecha committed 5c01d37 on 7.x-1.x
    git commit -m 'Issue #2666662 by monstrfolk: Pending claims not showing...
nikunjkotecha’s picture

Status: Needs review » Fixed

Fixed in dev.

monstrfolk’s picture

Status: Fixed » Closed (fixed)