Cannot delete a Favorites entry using an ID in the URL
Posted: 06 October 2008 09:24 PM   [ Ignore ]
Newbie
Rank
Total Posts:  7
Joined  2006-05-28

I have EE 1.6.4 and just purchased Favorites 2.5.1

I can Add, Delete All but cannot Delete an entry.  An older site with the same URL structure that uses Favorites 2.0.9 appears to work correctly with EE 1.6.4 (just upgraded the website)

I noticed someone had a similar issue and I did not see a resolution in the posts. How can this be corrected?

David2

Profile
 
 
Posted: 07 October 2008 07:35 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

David,

What do your links look like to delete a Favorites?

Additionally, what does your “add/delete” template look like? smile

 Signature 
Profile
 
 
Posted: 07 October 2008 07:27 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  7
Joined  2006-05-28

I am using a popup window which is the same as my existing site:

<a href="#" title="Delete from shortlist" onclick="window.open('http://w01.local/ltrott_ee/index.php/gallery/favorites_pick/43/delete', '_blank', 'width=610, height=450, location=no, menubar=no, resizable=yes, scrollbars=no')">Delete this image from your Favourites</a>

As far as I can tell, my URL structure complies with your documentation.

Profile
 
 
Posted: 08 October 2008 06:39 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

David,

If you add the weblog="default_site” parameter to the Favorites:Save function on the Save template, does it work? smile
(using the right weblog of course)

Also, if you disable and re-enable the Favorites Extension, does it solve the issue?

 Signature 
Profile
 
 
Posted: 08 October 2008 02:51 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  7
Joined  2006-05-28

Tried all of it. No luck.

Since the old version appears to work I will have to downgrade.

Profile
 
 
Posted: 08 October 2008 08:45 PM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  7
Joined  2006-05-28

Problem Solved!!

It appears that the URL to the delete command must end with the “/” character.

<a href="#" title="Delete from shortlist" onclick="window.open('{path=gallery/favorites_pick}{entry_id}/delete/', '_blank', 'width=610, height=450, location=no, menubar=no, resizable=yes, scrollbars=no')">

Notice ”...{entry_id}/delete/” at the end of the URL which is now working fine.

Finally your documentation should reflect this discovery. Your current documentation shows the following:

{exp:weblog:entries}
<h2>{title}</h2>
<p><a href="{path=’site/favorite_add’}{entry_id}/delete">Remove from my Favorites</a></p>
{/exp:weblog:entries}

Profile
 
 
Posted: 09 October 2008 07:24 AM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Thanks David! smile

It seems strange it would require this… I’ll see if we can get this fixed so it doesn’t cause a silly issue like this for others smile

 Signature 
Profile
 
 
Posted: 05 November 2008 02:12 PM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Hi dwells5,

When it wasn’t working, did it at all produce any errors? If so, what did it say? smile

 Signature 
Profile
 
 
Posted: 12 November 2008 07:20 PM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  7
Joined  2006-05-28

Favorites did not produce any error messages. It behaved as though it deleted the entry. However, it did not delete anything.

DW2

Profile