Closed (fixed)
Project:
Flag
Version:
6.x-2.0-beta4
Component:
Flag core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2010 at 22:52 UTC
Updated:
13 Jan 2018 at 07:57 UTC
Jump to comment: Most recent
After updating from 2.0-beta3 to beta4 I get the following error when I flag / unflag a node (link type = javascript toggle):
An HTTP error 404 occurred.
http://localhost/drupal/en/flag/flag/favorite_products/60?destination=taxonomy%2Fproducts%2F1&token=155b2becd4096092b58e762ed2dcd794
When I select as link type "normal link", I get the following error:
Page not found
The requested page could not be found.
I have following modules installed on my test site:
Token 6.x-1.15
Views 6.x-3.x-dev (2010-Nov-12)
Content Construction Kit (CCK) 6.x-3.x-dev (2010-Nov-11)
Internationalization 6.x-1.7
Internationalization Views 6.x-3.x-dev (2010-Jul-21)
jQuery UI 6.x-1.4
jQuery Update 6.x-2.0-alpha1
When I go back to version beta3 the problem is solved.
Comments
Comment #1
mooffie commentedI don't have an idea right now. Does it work when you remove the "en" prefix?
FWIW, in beta3 the menu item was:
whereas in beta4 it's:
Comment #2
tomsm commentedI have solved it.
The error was caused by a wrong "javascript parsed" entry in the i18n_variable table.
After removing it, the error was gone.
Comment #4
Dave Kinchlea commentedHi
I've got the same problem, just noticed it now. I don't have the il8n but do have a number of modules. Can you tell me a bit more about what you found and how you found it? Was it literally the string "javascript parsed" as a record entry ... as in a bad record?
Thanks for any help! It's good that downgrading to beta3 fixes things but I do like to stay current where I can.
Comment #5
tomsm commentedWith record I mean a line in a database table. I opened my Drupal database with phpMyAdmin. Then I opened the table i18n_variable and deleted the record with name "javascript parsed", because this should not be translated.
Do you have a multilingual site?
Comment #6
mooffie commentedDave, have you tried clearing Drupal's cache? Maybe the menu router needs rebuild.
Comment #7
Dave Kinchlea commented@tomsm: no, it is English only, that's why I was asking because I thought I would have to go table surfing myself. It seems my fix was even easier however.
@mooffie: well not directly but standard operating procedure is for me to run an updatedb which I assume clears the cache (this is all scripted). Upon reading your reply, however, I re-upgraded, cleared the cache manually and voila so perhaps SOP wasn't followed in this case or the script is broken. Anyway operator error seems most likely the cause (and time for some further troubleshooting).
Upon reflection I think I assumed too much ... if "drush updatedb" doesn't find any updates to apply I suspect it doesn't clear cache (why would it?) and although 7 different modules were upgraded that run it appears that none triggered an update. Time to fix that script and stop assuming so much :-)
Thanks to both! Love the support!
Comment #8
philsward commentedI too received the same error and found that Boost was the problem. After shutting boost off, the flag began working properly. After clearing all of the cache on boost, I then ran into the issue where clicking on the flag, if "Normal Link" was used, would not update the page. Turning on the "Javascript Link" worked though I don't like the output of the status message :(
Hope that helps out someone else :)
Comment #9
philippkipp commentedI've got the same issue. deleted the javascript line from the database as suggested above. Does not help at all. Not using Boost.
What I am trying to to is using the flag link in a panel. To use ist there it created a block with the code in it
The resulting link address is:
DOMAINNAMEHERE.COM/flag/flag/FLAGTYPEHERE/?destination=node%2F30&token=753903c3196b5ca88ad798340b08fb48nid is 30. Maybe i need to on the fly replace the %2F with /, but I don't know how to do that.
Can anybody help?
Comment #10
tajindersingh commentedHello Philippkipp,
You are using:
where $node object requires to be there, but in panels this might not be the case.
In resulting link address NODE ID for node to be flagged is missing:
DOMAINNAMEHERE.COM/flag/flag/FLAGTYPEHERE/[NODE ID SHOULD BE HERE]?destination=node%2F30&token=753903c3196b5ca88ad798340b08fb48
That means $node->nid doesn't available when the code is called.
Try below code considering your panels page is receiving arg(1) being nid which is usually a case with node page:
Best of luck,
Tajinder Singh
IMP Technologies
Creating Masterpieces...
http://imptechs.com
Comment #11
webindustries commentedperfect fix thanks!
Comment #12
sjhuskey commentedI was having this issue in a view. I had the following code to display a flag:
That displayed the flag, but clicking on it produced a 404 error. The issue was easily resolved: I added Content: Nid to the fields in my view, set it not to be displayed, and my flag worked again. This is probably obvious to many, but I mention it here in the hope that it will save others some time.
Comment #13
stanoreke commented#12 saved me after spending lots of hours on it.
Thanks
Comment #14
drvdt commentedThanks to sjhuskey with #12
Check your display, maybe not have nid to flag