I just installed alpha 11 and am setting up new feed importers and it looks like the Remove link is no longer an option in mapping table.

Screenshot attached.

Comments

alex_b’s picture

Status: Active » Postponed (maintainer needs more info)

I can't confirm this. Does this happen in any browser?

caktux’s picture

Had the same issue in alpha10 using FF 3.6, Safari and Chrome... I don't think it's a browser issue..

sagannotcarl’s picture

Status: Postponed (maintainer needs more info) » Active

Interesting, I was not experiencing this problem with the dev version (from Jan 29th or somewhere around there) in Firefox 3.5.7 on a Mac. It only started for me when I went to alpha11.

I haven't tried the newest dev version.

ManyNancy’s picture

Same here on the latest.

alex_b’s picture

Again: I can't confirm this on my local setup:

* MacOS,
* PHP5.2.6,
* Feeds 1.0 alpha 11,
* using the "Feed" configuration that comes with feeds_defaults and creating a new feeds importer configuration.

I find that the 'remove' link *is* present and works in Firefox and Chrome...

sagannotcarl, ManyNancy: could you

* describe your local set up better and post a step by step walkthrough on how to reproduce the error?
* use the Firefox Firebug console and see whether any JS errors are reported?
* take a look at the DOM of the mapping page and see whether there are hidden elements (a remove link or a remove check box) that should be visible?

Thanks for your help in debugging this.

sagannotcarl’s picture

StatusFileSize
new43.06 KB

* MySQL database - 5.1.39
* PHP - 5.2.12
* PHP memory limit - 128M
* PHP register globals - Disabled
* Unicode library - PHP Mbstring Extension
* Web server - Apache/2.2.14 (FreeBSD) mod_ssl/2.2.14 OpenSSL/0.9.8e DAV/2 mod_fastcgi/2.4.6
* Feeds 6.x-1.0-alpha11
* Cloning the "Feed" configuration that comes with feeds_defaults and creating a new feeds importer configuration

<thead class="tableHeader-processed">
  <tr>
    <th>Source</th>
    <th>Target</th>
    <th>Unique target</th>
    <th>&nbsp;</th> 
  </tr>
</thead>

* No JS errors

Ahh, there is a hidden element there (see screenshot). Looks that that's the issue.

sagannotcarl’s picture

So there is a link element there, it just doesn't have any text in it:

<a href="#" onclick="return false;" class="feeds-ui-trigger-remove"></a>

should be:

<a href="#" onclick="return false;" class="feeds-ui-trigger-remove">Remove</a>
sagannotcarl’s picture

So a little more info. I used firebug to put text into the a element and the it still doesn't work, not surprising but it's not quite that simple ;)

alex_b’s picture

#6 - Thank you for the debugging work.

This is how the same snippet looks like on my FF 3.5.7 w/ Feeds HEAD (very similar to alpha11) http://skitch.com/alexbarth/ni3hp/edit-feed-drupal-6

This is how the same snippet looks like in Google Chrome:
http://skitch.com/alexbarth/ni34i/developer-tools-http-localhost-d6-admi...

Your assessment in #7 is correct: the Remove text in the anchor tag is missing. It seems that its not copied right from the checkbox's label:

http://skitch.com/alexbarth/ni36d/screen-shot-2010-02-16-at-11.44.27-am....

The code that is responsible for this copy can be found in feeds_ui/feeds_ui.js:

  // Replace checkbox with .feeds-ui-checkbox-link class with a link.
  $('.feeds-ui-checkbox-link:not(.processed)').each(function(i) {
    $(this).addClass('processed').after(
      '<a href="#" onclick="return false;" class="feeds-ui-trigger-remove">' + $(this).children(' label').text() + '</a>'
    ).hide();
  });

The command $(this).children(' label').text() appears to not find "Replace", therefore you wind up with an empty anchor tag.

Care to figure out why this fails on your setup and how to fix it?

alex_b’s picture

indytechcook’s picture

The HTML being output in the form is not consistant with the jquery selectors:

Here is the HTML being generated: http://skitch.com/indytechcook/ni4qs/edit-tms-project-leapfrog-dev-site.

I placed $(this).addClass('tester'); on line 55 of feed_ui.js.

  // Replace checkbox with .feeds-ui-checkbox-link class with a link.
  $('.feeds-ui-checkbox-link:not(.processed)').each(function(i) {
    $(this).addClass('tester');
    $(this).addClass('processed').after(
      '<a href="#" onclick="return false;" class="feeds-ui-trigger-remove">' + $(this).siblings('label').text() + '</a>'
    ).hide();
  });

You can see that there is another div between (this) and the label. Since it's not a direct child, the children() function will not work.

Why don't we just use 'Remove' instead of attempting to get the label of the checkbox? You already hard coded the class name for the remove functionality. Not likely this link is going to do anything else :)

  // Replace checkbox with .feeds-ui-checkbox-link class with a link.
  $('.feeds-ui-checkbox-link:not(.processed)').each(function(i) {
    $(this).addClass('processed').after(
      '<a href="#" onclick="return false;" class="feeds-ui-trigger-remove">' + 'Remove' + '</a>'
    ).hide();
  });

EDIT: I did my testing in FF 3.6 and I didn't notice the 2 comments above this one...

indytechcook’s picture

Status: Active » Closed (duplicate)

Alex, that patch works. Setting this one as a duplicate since the other contains a patch.

http://drupal.org/node/717168

FYI, you could also use .find() instead of .children()

http://api.jquery.com/find/

If it matters, i'm using jquery 1.3.2