Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Cleanup shell does not handle custom root path and plugin model names #235

Open
isemantics opened this issue Jun 13, 2017 · 1 comment
Open
Labels

Comments

@isemantics
Copy link
Contributor

Maybe I'm doing something wrong, but I've tried to dry run the cleanup shell as documented but get no results (no filenames in log after dry run). I've looked at the code and I see 2 possible issues:

  1. Cleanup shell takes the WWW_ROOT and not the actual (possible/optional) root path used in the configuration of Proffer in the model. For example, I have a constant CDN_PATH and set as "root" in the Proffer settings.
  2. I might be doing this wrong, but read the code to be more sure: I'm running the dry run using ./bin/cake proffer cleanup -vd Carousels.CarouselSlides . This shows no files to be deleted ( in conjuction with (1) ). Due to the use of $table in this line of code: https://github.com/davidyell/CakePHP3-Proffer/blob/master/src/Shell/ProfferShell.php#L167 , it will put the whole plugin+table name into it and looks for a directory "carousels.carouselslides" which does not exist, because Proffer (after uploading files) created it as "/carouselslides" .
    Also, might be useful to think about conflicting plugin names and directory names when not including the plugin name into the final folder. Not that important, but could be useful in situations where 2 plugins exist that have a model table "Users" (with "image" field) and thus will both use "/users/image/.." ( I think? )

I'm trying to fix it locally inside the Proffer code ( or figure out along the way the above are no issues at all :) ). Hopefully I finish it and then will post/PR it, but clients are pressing for other priorities ( life.. you know.. )

@davidyell davidyell added the bug label Jun 13, 2017
@davidyell
Copy link
Owner

Could be related to #181

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

No branches or pull requests

2 participants