Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SwethaMuralidharan
Copy link

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.

<h3 class="sidebar_title"><%= sidebar.title %></h3>
<div class="sidebar_body">
<h3 class="sidebar-title"><%= sidebar.title %></h3>
<div class="sidebar-body">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did not check out master before you created this new branch. That is why your issue #1 changes are still on this branch.

This is an unnecessary change, because this code has nothing to do with issue #2.

@@ -77,6 +77,7 @@ function tag_manager() {

function save_article_tags() {
$('#article_keywords').val($('#article_form').find('input[name="hidden-article[keywords]"]')[0].value);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary change.

@esthersweon
Copy link

I would create a new branch off master and submit a new PR to get rid of the issue #1 code changes.

@@ -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);

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()

@mnfmnfm
Copy link

mnfmnfm commented Jan 22, 2018

Still has the same issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants