Opened 5 years ago

Closed 3 years ago

Last modified 3 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 3 years ago.
Validate slug
128.2.diff (1010 bytes) - added by markoheijnen 3 years ago.
Includes 1 unit tests

Download all attachments as: .zip

Change History (15)

comment:1 @juanramondiaz4 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.

comment:2 @mtekk4 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.

comment:3 @petervanderdoes4 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 :)

comment:4 @sushkov3 years ago

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

comment:5 @willmot3 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.

comment:6 @tschutter3 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.

comment:7 @markoheijnen3 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.

@markoheijnen3 years ago

Validate slug

comment:8 follow-up: @markoheijnen3 years ago

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

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

comment:9 in reply to: ↑ 8 @markoheijnen3 years ago

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

@markoheijnen3 years ago

Includes 1 unit tests

comment:10 @markoheijnen3 years ago

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

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

comment:11 @markoheijnen3 years ago

  • Keywords commit added

comment:12 @markoheijnen3 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

comment:13 @markoheijnen3 years ago

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