Zen Cart Logo
Forums / Code Collaboration / Github Collaboration

Github Collaboration

Views: 39,501

Results 1 to 20 of 35
9 Jul 2014, 7:33 PM
#1
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,903
Plugin Contributions:
3

Github Collaboration

Hi.

We have been making some changes to our github account in relation to how people can contribute to core code, as well as adding some stuff to make it easier to set up a development environment for v160.

To get started, see http://docs.zen-cart.com/Contributing/main

For the development environment see the Habitat repostitory and associated help pages
For the main v160 development, we are in the process of moving our internal issues, that we previously tracked with JIRA, directly on to github.

We have also created a Contributors team on Github that consists of people who have previously contributed pull requests to the github v160 branch.

Creating this team allows us to assign tasks to people in the Contributors team.
If you want to be part of this team, you need to:

  1. create a github account
  2. fork the zencart/zencart repository
  3. PM a founder for them to activate your github team account, and include the link to your forked repository
  4. When pm'ing a founder, it would help if you could give some detail about what areas of code you could help with

PM Links
DrByte http://www.zen-cart.com/private.php?do=newpm&u=6
wilt http://www.zen-cart.com/private.php?do=newpm&u=2

19 Sep 2014, 5:47 PM
#2
s_p_ike avatar

s_p_ike

Zen Follower

Join Date:
Feb 2005
Location:
Italy
Posts:
178
Plugin Contributions:
0

Re: Github Collaboration

Hello, I had some problems to have habitat working on a win 7 machine. Here they are and how I solved them:

  1. I already have mysql installed on my win 7, with the default port 3306. But running vagrant up says that there is a conflict over the port 3306, because habitat uses the same port.

The solution is to forward the port for mysql (for the vm we're installing) to another port. I used 33306.
To make this, go to habitat.rb in your habitat folder, near line 25 you find config.vm.network "forwarded_port", guest: 3306, host: 3306 just change the second value to 33306 (or any other value not conflicting).

  1. After that I was able to access mysql via ssh (hmmm using putty, not yet simply typing vagrant ssh) and was able to access zen.local via browser but it was empty. Looking at the messages after vagrant up I understood that ssh commands were not executed, so, after a bit of google, I found that even if I had a ssh client installed, it was not available in my habitat folder. So the solution was to add the path to my ssh client exe to the path.

  2. After that I run again vagrant provision, but new errors came up: something like \r command not found referred to line, line 8 etc... of serve.sh So I just opened serve.sh and changed the line endings from windows to Unix.

This solved everything and after another provisioning, it started syncing with Github (now I just have to remove everything again and try to provision the machine using my keys for Github).

Hope this may help others with similar issues :)

Paolo De Dionigi
Co-maintainer of Zen Cart Italia

20 Sep 2014, 9:07 PM
#3
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,903
Plugin Contributions:
3

Re: Github Collaboration

Hi

Thanks for the post. It probably makes sense to allow for defining of some of the port forwards. We are working on some updates habitat and will build that into it.

30 Sep 2015, 10:28 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Github Collaboration

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 May 2016, 9:10 AM
#5
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Github Collaboration

I find the Github->New Issues->Submit button is not available/grayed/greened-out:

Attachment 16315

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

16 May 2016, 9:44 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Github Collaboration

torvista:

I find the Github->New Issues->Submit button is not available/grayed/greened-out:

Attachment 16315
Are you logged in?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 May 2016, 10:03 AM
#7
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Github Collaboration

Are you logged in?
Yes...link to my profile is active

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

16 May 2016, 1:31 PM
#8
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: Github Collaboration

are you sure you are on the right repository?

https://github.com/zencart/zencart/issues/new

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

16 May 2016, 10:27 PM
#9
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Github Collaboration

are you sure you are on the right repository?
Yes...I tried again with your link...and have just spotted that if you don't put a title...the Submit does not work...and does not flag the error!

So, I'll put that down to bad form design, it couldn't be user error!:blush:

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

17 May 2016, 1:00 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Github Collaboration

torvista:

Yes...I tried again with your link...and have just spotted that if you don't put a title...the Submit does not work...and does not flag the error!

So, I'll put that down to bad form design, it couldn't be user error!:blush:

Yeah, there's a similar problem if you edit the code from the github website and after all sorts of clicking this, typing that, if the result of your code is to end up back to where you started, no matter how much content you put into the description box, the button to commit the changes behaves the same way. :P Sorry for not asking further as I misunderstood the condition(s) that were plainly provided. I thought the issue was that couldn't initiate the area to fill in an issue, not that while filling in the issue information it could not be further submitted. :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

24 May 2016, 9:56 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Github Collaboration

FYI the github repo has been renamed from zencart/zencart to zencart/zencart

Existing checkouts/forks and issues/PRs will continue to work, because github has an internal redirect/alias in place.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

5 Jul 2018, 5:32 AM
#12
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Github Collaboration

Regarding working with the local clone fileset, I still feel in the dark about the process and would appreciate some clarification.

As far as I can see, after creating a local clone, I have to copy this again to make a fileset that can be installed/executed/modified/tested using my local server (since the admin name must be different). There is no way to use this clone directly?

Once I have finished the modifications, I have to
a) fetch any changes from origin to local clone to ensure no conflicts.
b) make a relevant branch in the local clone and copy changes from the installed fileset to the clone to start the push/pull process.

Seems unwieldy, but I don't find any info that details these nuts and bolts of actual use/testing.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

5 Jul 2018, 11:31 AM
#13
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Github Collaboration

You can keep the name "admin" in your local testing by adding to your admin/includes/configure.php file this line:

define('ADMIN_BLOCK_WARNING_OVERRIDE', '1');

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

5 Jul 2018, 1:18 PM
#14
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Github Collaboration

You can keep the name "admin" in your local testing..
Well fancy that!

So reading between the lines, does that mean the usual way to work is use that override to work directly on the cloned fileset?
Anything else to add?

If not, a bit more padding along the lines of your reply and my posts should be added here for future novices:

http://docs.zen-cart.com/Contributing/main/github_workflow

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

5 Jul 2018, 1:28 PM
#15
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Github Collaboration

  • You should do your changes on a branch and submit them as a PR.
  • Update frequently.
  • If you are working on the develop branch (the old 1.6.0), you will need to recreate your database frequently; database changes are made that you'll need to have for things to keep working. Alternatively, you can keep a 1.5.5 database around and run the upgrade process, which usually works (if it doesn't open an Issue).
  • Keep your PRs scoped to just the issue you are fixing; don't submit a PR with 10 fixes in it.
  • Have fun! :)

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

6 Jul 2018, 7:49 AM
#16
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Github Collaboration

what about having to rename/hide the zc_install directory?

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

6 Jul 2018, 11:28 AM
#17
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Github Collaboration

When ADMIN_BLOCK_WARNING_OVERRIDE is defined, this check is skipped.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

30 Mar 2020, 8:40 AM
#18
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Github Collaboration

When ADMIN_BLOCK_WARNING_OVERRIDE is defined, this check is skipped.
No it isn't, you need this too.

define('WARN_INSTALL_EXISTENCE', '0');//allow zc_install folder

I put both of these in the admin /local/configure.php

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

30 Mar 2020, 12:03 PM
#19
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Github Collaboration

Cool. Can you update the documentation page on this:
https://docs.zen-cart.com/dev/developer_environment/

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

30 Mar 2020, 2:37 PM
#20
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: Github Collaboration

swguy:

Cool. Can you update the documentation page on this:
https://docs.zen-cart.com/dev/developer_environment/

thanks both of you. couple of things:
2

  • the ZC load function is complex, and while putting in the place above works, i have these vars defined in a separate script in the extra_configures directory. which also works. i would encourage documentation to somehow reflect this nuance.
  • more importantly, can we simplify ZC? when needed? why are there 2 constants here? someone went in and said, "yo, yo, yo ZC, i know security by obfuscation, but i'm doing development work and i don't want to mess up my git repository, leave my admin directory as is." aka, the first constant. and ZC said, "cool, no worries." but then ZC tells this developer person, you have a security risk due to the presence of the zc_install directory. do we really need the second constant here? can we just use one?
  • this gets to the debugging of ZC. it would be nice to be able to turn on debugging in one place, and boom, verbose logs, strict reporting, etc. instead, everywhere it seems there is another DEBUG constant being used. would make troubleshooting so much better IMO.

rant over.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.