I dont know whats going on here but i can see any of the fasttoggle links when I create a simple content view.

This is my view:

$view = new view;
$view->name = 'test';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'test';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'test';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['row_options']['hide_empty'] = 0;
$handler->display->display_options['row_options']['default_field_elements'] = 1;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Content: Publish Link (Fasttoggle) */
$handler->display->display_options['fields']['publish_node']['id'] = 'publish_node';
$handler->display->display_options['fields']['publish_node']['table'] = 'node';
$handler->display->display_options['fields']['publish_node']['field'] = 'publish_node';
$handler->display->display_options['fields']['publish_node']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['publish_node']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['publish_node']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['publish_node']['alter']['external'] = 0;
$handler->display->display_options['fields']['publish_node']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['publish_node']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['publish_node']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['publish_node']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['publish_node']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['publish_node']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['publish_node']['alter']['trim'] = 0;
$handler->display->display_options['fields']['publish_node']['alter']['html'] = 0;
$handler->display->display_options['fields']['publish_node']['element_label_colon'] = 1;
$handler->display->display_options['fields']['publish_node']['element_default_classes'] = 1;
$handler->display->display_options['fields']['publish_node']['hide_empty'] = 0;
$handler->display->display_options['fields']['publish_node']['empty_zero'] = 0;
$handler->display->display_options['fields']['publish_node']['hide_alter_empty'] = 0;
/* Field: Content: Promote Link (Fasttoggle) */
$handler->display->display_options['fields']['promote_node']['id'] = 'promote_node';
$handler->display->display_options['fields']['promote_node']['table'] = 'node';
$handler->display->display_options['fields']['promote_node']['field'] = 'promote_node';
$handler->display->display_options['fields']['promote_node']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['promote_node']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['promote_node']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['promote_node']['alter']['external'] = 0;
$handler->display->display_options['fields']['promote_node']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['promote_node']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['promote_node']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['promote_node']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['promote_node']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['promote_node']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['promote_node']['alter']['trim'] = 0;
$handler->display->display_options['fields']['promote_node']['alter']['html'] = 0;
$handler->display->display_options['fields']['promote_node']['element_label_colon'] = 1;
$handler->display->display_options['fields']['promote_node']['element_default_classes'] = 1;
$handler->display->display_options['fields']['promote_node']['hide_empty'] = 0;
$handler->display->display_options['fields']['promote_node']['empty_zero'] = 0;
$handler->display->display_options['fields']['promote_node']['hide_alter_empty'] = 0;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'product_display' => 'product_display',
);
$handler->display->display_options['filters']['type']['group'] = 0;

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'test';

This is what i got on my html

<div class="views-field views-field-publish-node">
<span class="views-label views-label-publish-node">Publish Link (Fasttoggle): </span>
<span class="field-content"></span>
</div>
<div class="views-field views-field-promote-node">
<span class="views-label views-label-promote-node">Promote Link (Fasttoggle): </span>
<span class="field-content"></span>

I used the last dev and also beta2. Any thought why is this happening?

Comments

derjochenmeyer’s picture

Status: Active » Needs review
StatusFileSize
new3.5 KB

Attached patch fixes the fasttoggle links in views.

It also addresses an issue (ajax errors) when using fasttoggle with Drupal installed in a subdirectory.

derjochenmeyer’s picture

StatusFileSize
new3.5 KB

Just replaced a TAB with spaces.

derjochenmeyer’s picture

derjochenmeyer’s picture

Title: Views (Fasttoggle) fields problem » Fasttoggle links in views are not displayed, Fasttoggle views integration is broken

Better title, ...

Prasad W’s picture

Version: 7.x-1.x-dev » 6.x-1.4

I used fasttoggle in views for nodes like promote a link, but I want to add fasttoggle to user status field. There is no option to toggle user status. How can i get it?

derjochenmeyer’s picture

Version: 6.x-1.4 » 7.x-1.x-dev

Don't hijack this issue, please create a new one.

ari-meetai’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new6.33 KB

Tried your patch. Still getting error 500.

Have a look at the screenshot:

http://imageshack.us/photo/my-images/36/toogleerror.png

vanilla D7 installed on /drupal.

ari-meetai’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta2
Status: Needs review » Reviewed & tested by the community

Changed status and version.

nigelcunningham’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta2
Status: Needs review » Closed (fixed)

Thanks very much for the patch, and sorry for my slowness in responding. I've just tested and committed it to the git repo.

Regards,

Nigel

hlopes’s picture

Version: 7.x-1.0-beta2 » 7.x-1.2
Status: Closed (fixed) » Active

Fasttoggle is still displaying this behaviour in my D7 site.

Label outputs correctly, the link doesn't. Can't get it to do anything, actually.

nigelcunningham’s picture

Would you try current 7.x-dev, please?

jarodms’s picture

I tried the current DEV release. I'm not getting any errors, but the Publish/Unpublish links are not showing up in my view (logged in as user 1). Anyone else?

tjharman’s picture

@jarodms What version, 6 or 7?

If 6, I have a bug open for this already here.

gianfrasoft’s picture

Same problem here...

gianfrasoft’s picture

Priority: Normal » Major

hem...

nigelcunningham’s picture

There are new configuration options - you now need:

  • sitewide settings enabled
  • content type settings enabled (for nodes)
  • permissions in your role to toggle links

Regards,

Nigel

gianfrasoft’s picture

Sorry, this doesn't help me... :(

It seems in my installation something is missing.

1) This is my sidewide configuration:

Configure what fast toggling options are available.

Label style
O  Status (reflects the current state, e.g. "published", "active")
X   Action (shows what happens upon a click, e.g. "unpublish", "block")
Select what kind of labels you want for fasttoggle links. See the README.txt for information about providing your own labels.

(But I swear I saw other settings before installing the DEV version. Now I re-installed the stable version of this module but I can't see them too. Thoese were also useless: the fasttoggle field diddn't appear in views).

2) No content type setting about Fasttoggle.

3) Permissions are useless in my case: I'm logged as admin.

Thanks for your help!

uno’s picture

Has anybody been able to have working Fasttogle (7.12) links in Views, I (user/1) have done everything, reinstalled, tried dev version, activated all module options, set in General, Node and added fields in Views .. still have nothing usable.

<div class="views-field views-field-promote-node">
<span class="field-content"></span>
</div>
les lim’s picture

Looks like the Views handler hasn't been updated since the re-factoring occurred between 7.x-1.1 and 7.x-1.2, which is why there's never any Views output for the field. Here's a patch that should get things going.

Note that this only applies to 7.x-1.2; dev appears to have diverged irreconcilably.

les lim’s picture

StatusFileSize
new2.03 KB

Might help if I actually upload the patch.

EDIT: don't use this one, use the one below this.

les lim’s picture

Status: Active » Needs review
StatusFileSize
new2.02 KB

New patch to fix class selectors not matching what's expected by the AJAX callback.

les lim’s picture

Eh, I really should also set the initial "status" class on the link element, as well.

uno’s picture

Patch #22 adds "un/publish" option but "sticky" and "promote" are still empty. However, this is a step forward :)

uno’s picture

Issue summary: View changes

last code refers to another view in table style format (same problem too)

nigelcunningham’s picture

Thanks for the patch. I used it as a beginning, and committed changes to dev yesterday that (I believe) fix all views integration. Please test and let me know if I've missing something or erred.

nigelcunningham’s picture

Issue summary: View changes
reallyordinary’s picture

Just installed dev version. Attempted to add a fasttoggle field to a view, but there aren't any. All the fasttoggle options in the "Add fields" modal are gone.

Also all the permissions are gone on the Permissions admin screen, except for "Administer Fasttoggle".

uno’s picture

@reallyordinary

Make sure to delete old files prior to uploading new ones, and then clear caches.

nigelcunningham’s picture

Yes, I do still need to do some work on the fields part of things after the big rework I've done in -dev. I'll try to get on to that soon. Feel free to prod me :)

nigelcunningham’s picture

@reallyordinary: There are new per-content type settings that you need to enable. I'll add that info to that admin page as it has gotten other people too.

nigelcunningham’s picture

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

The original issue was fixed; closing.