Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Conversation

@lijulat
Copy link
Contributor

@lijulat lijulat commented Jan 24, 2017

fix issue #932

@birdofpreyru
Copy link
Collaborator

@lijulat I've tested my local deploy with you change, and don't see any difference between previous behaviour and what I see now. Do you? Am I doing anything wrong?

@lijulat
Copy link
Contributor Author

lijulat commented Jan 25, 2017

@birdofpreyru . I had trouble running the app locally. The code fix was based on my code analysis.

I am running on windows 10 machine . But my vagrant vm always gives me Authentication failure issue. Any idea?

I would very much like to continue working on this but If you think it will hamper the delivery time, then you may re assign this to some one else.

@birdofpreyru
Copy link
Collaborator

@lijulat
Yeap, please keep on working on this.

For you problem:

  1. Open Vagrantfile in the code from tc1-mf-vagrant repo, un-comment the config.ssh.password = "vagrant" string. Also make sure that localTCSite = ... variable points to the valid folder with the tc-site code on you host machine.

  2. When you run first, it should complain that you are missing wp-config.php file. You should create it. You put in there the username root, the empty password, and the database wp, it should work then.

Don't hesitate to ask if you have other problems with the local deployment. I've done it work on my machine, but I might forget about some steps.

@lijulat
Copy link
Contributor Author

lijulat commented Jan 25, 2017

@birdofpreyru Thanks for your help. the vagrant is asking me for login details. Do you know what login should be given?

@birdofpreyru
Copy link
Collaborator

@lijulat Do you mean, when you do $ vagrant ssh? It should be the same ssh password you state in Vagrant file, which is vagrant if you have not changed it.

@lijulat
Copy link
Contributor Author

lijulat commented Jan 25, 2017

@birdofpreyru thanks. Yes had to un comment the password line. Now the vm is running and I ran the grunt dev task. its running the watch task, But when i navigate to the http://local.topcoder.com/ I get a no input file specified error. Any pointers?

@birdofpreyru
Copy link
Collaborator

@lijulat
Have you pointed localTCSite variable in the Vagrantfile to the tc-site directory on your host machine?
Have you configured the routing on the host machine so that local.topcoder.com points to the IP address of the Vagrant virtual machine?

In principle at this point, if everything is configured right, local.topcoder.com should either show you the website, either complain that there is no wp-config.php file.

@lijulat
Copy link
Contributor Author

lijulat commented Jan 25, 2017

@birdofpreyru

  1. Yes

  2. Yes

  3. Where should i create the wp-config.php ? Do you have sample file

@birdofpreyru
Copy link
Collaborator

@lijulat

In my case, it asked itself, when I browsed to local.topcoder.com. That file is a part of the WordPress engine, which is used in part of TC website, and WordPress comes with the tool which creates that file automatically.

Sure, you also can create it manually: in /wp folder you have wp-config-sample.php so, copy, rename, correct it. But, if your local deployment does not ask for it automatically, I would say you should re-check everything else. Probably, it is something Windows-specific, which I am not aware of.

@lijulat
Copy link
Contributor Author

lijulat commented Jan 25, 2017

@birdofpreyru Got it to work . thanks for your help :).

But the site looks different from the live site.
capture

Any idea?

@birdofpreyru
Copy link
Collaborator

@lijulat This is fine. The production version of TC site uses the endpoints from topcoder-app for some parts (dashboard, profile, some others), and it uses tc-site for some other parts (challenge listing, some other sections). Because of this, there are actually two copies of the top menu, one in each of the repos. So, back to the issue, the menu version and related code from topcoder-app do work fine, the version of the menu from tc-site, which you see on challenge listing page, encounters some error, which breaks the menu, and that's why you don't see user sub-menu there. So, you goal is to find out, what is going on there, and to fix it.

@birdofpreyru
Copy link
Collaborator

@lijulat Also, be aware, that there are probably two versions of the top menu in the tc-repo itself. The one from /src is visible in the challenges listing pages, but there is another one somewhere in /wp, which is shown at the pages served by the WordPress. So, be sure to check all of them :)

@lijulat
Copy link
Contributor Author

lijulat commented Jan 25, 2017

@birdofpreyru I actually can see the user menu.
capture2
Not sure if am missing something.

@birdofpreyru
Copy link
Collaborator

@lijulat Sorry, I didn't look to the screenshots careful enough. What you see, is not quite what you are supposed to see on the challenge listing page http://local.topcoder.com/challenges/develop/active/?pageIndex=1

That page, and the top menu, should look exactly the same, as they look at the www.topcoder.com Try to re-run grunt dev from inside the vagrant VM.

@birdofpreyru
Copy link
Collaborator

@lijulat Actually, when I was deploying the local version of this code, the first time I had the same issue, it was serving some old styled pages for the challenge listing, but then, after some manipulations, it started to work right.

@lijulat
Copy link
Contributor Author

lijulat commented Jan 25, 2017

@birdofpreyru I am using the dev branch of the tc-site. Hope thats the right one?

@birdofpreyru
Copy link
Collaborator

@lijulat Yes, that's right. So, just rebuild/refresh it, probably it is some caching issue.

Yeah, also, while trying to make it run properly, I have added to my wp-config.php these lines:

define('WP_SITEURL','http://local.topcoder-dev.com');
define('WP_HOME','http://local.topcoder-dev.com');

I'm not sure, whether these have any influence, but you also may try, just in case.

@birdofpreyru
Copy link
Collaborator

@lijulat Also, probably, cleaning the cache of you browser might be helpful. I've just encounter a situation, when what I was seeing visiting local.topcoder.com was different from what I had in tc-site, and resetting the cache helped.

@lijulat
Copy link
Contributor Author

lijulat commented Jan 26, 2017

@birdofpreyru Thank you for being patient. I managed to get it running after clearing the cache and restarting my laptop. I have now fixed this.

The PR has been updated . Please check.

@birdofpreyru birdofpreyru merged commit 2b9c1ac into topcoder-archive:dev Jan 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants