Opened 8 years ago

Closed 5 years ago

Last modified 5 years ago

#128 closed defect (fixed)

Path isn't set when adding project

Reported by: rmccue Owned by: markoheijnen
Milestone: 1.0 Priority: major
Version: 0.1 Component: General
Keywords: Cc: juanramondiaz, stas@…


The "path" field is not set by GlotPress when attempting to add a project to the database. As the field in the schema is marked NOT NULL, this causes the project to not be created. Additionally, no error is displayed when this occurs.

Attachments (2)

128.diff (379 bytes) - added by markoheijnen 5 years ago.
Validate slug
128.2.diff (1010 bytes) - added by markoheijnen 5 years ago.
Includes 1 unit tests

Download all attachments as: .zip

Change History (15)

#1 @juanramondiaz
6 years ago

  • Cc juanramondiaz added
  • Resolution set to worksforme
  • Status changed from new to closed

For me, it's working fine. This ticket was opened 16 months ago, so maybe it's an old bug.

#2 @mtekk
6 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

I can reproduce this one on my live site but not on my testbed. Not sure what server side is causing this to happen. It would probably be better to set everything in the insert query for the project rather than insert a partial project and update with the path shortly afterward.

If you need any additional information about my two environments I'll try to provide it.

#3 @petervanderdoes
6 years ago

  • Keywords reporter-feedback added
  • Owner changed from somebody to petervanderdoes
  • Status changed from reopened to accepted

Let's revive this one :)

First is this still an issue? If yes continue if not, glad I could help LOL.

Please update to the latest revision of GlotPress.

If it's still an issue:

  1. What's the name of your project?
  2. Do you set the slug or let GlotPress handle it?
  3. Is it a child project? If so the questions 1 and 2 apply to the parent as well.

For both production and test bed.
PHP version

I just hope it's no longer a problem :)

#4 @sushkov
5 years ago

  • Cc stas@… added
  • Keywords dev-feedback needs-testing added
  • Milestone set to 1.0
  • Version set to 0.1

#5 @willmot
5 years ago

I tested this locally.

project name test, slug left blank, path is correctly set to test.
sub-project name test, slug left blank, path is correctly set to test/test.
project name @@@, slug left blank, path is set to blank. Project is created but impossible to navigate to.

Looks like there is an issue when the name contains only characters that can't be slugified.

#6 @tschutter
5 years ago

I have the same problem running NGINX 1.2.7, PHP 5.4.

It did not matter what I used as a slug. It resulted in the path not being set.

Temporary solution for me was to allow NULL for path in the DB. Because the path is set in another query it wasn't a problem.

#7 @markoheijnen
5 years ago

  • Owner changed from petervanderdoes to markoheijnen
  • Status changed from accepted to assigned

I see issues with what willmot described. However not what tschutter described when running nginx 1.2.5/1.2.7 and PHP 5.4.4. I will be working on a fix. Something in the way of checking/creating the slug before inserting the project. When empty return an error.

5 years ago

Validate slug

#8 follow-up: @markoheijnen
5 years ago

I added a patch. This seems good enough. Curious what you guys think about it.

Last edited 5 years ago by markoheijnen (previous) (diff)

#9 in reply to: ↑ 8 @markoheijnen
5 years ago

Last edited 5 years ago by markoheijnen (previous) (diff)

5 years ago

Includes 1 unit tests

#10 @markoheijnen
5 years ago

  • Keywords has-patch added; reporter-feedback needs-testing removed

Just added another patch testing a project with @@@@ as name.

#11 @markoheijnen
5 years ago

  • Keywords commit added

#12 @markoheijnen
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [744]) Don't allow slug to be empty. This can happen when the project name has only illegal characters. Fixes #128

#13 @markoheijnen
5 years ago

  • Keywords dev-feedback has-patch commit removed
Note: See TracTickets for help on using tickets.