-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post tags correctly #2 #13
base: master
Are you sure you want to change the base?
Post tags correctly #2 #13
Conversation
<h3 class="sidebar_title"><%= sidebar.title %></h3> | ||
<div class="sidebar_body"> | ||
<h3 class="sidebar-title"><%= sidebar.title %></h3> | ||
<div class="sidebar-body"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -77,6 +77,7 @@ function tag_manager() { | |||
|
|||
function save_article_tags() { | |||
$('#article_keywords').val($('#article_form').find('input[name="hidden-article[keywords]"]')[0].value); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary change.
I would create a new branch off |
@@ -76,7 +76,8 @@ function tag_manager() { | |||
} | |||
|
|||
function save_article_tags() { | |||
$('#article_keywords').val($('#article_form').find('input[name="hidden-article[keywords]"]')); | |||
$('#article_keywords').val($('#article_form').find('input[name="hidden-article[keywords]"]')[0].value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also just add jQuery method .val()
Still has the same issues |
Explanation:
On publish button click, the method "save_article_tags" gets called which saves the tag in db. So identified that the problematic area is here. In console, inspected that input tag element and noted that ("[0].value") was missing at the end to fetch the actual tags value in the input tag.
I added new tags and it gets displayed successfully.