Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using project config unable to move assets #3707

Closed
johnfmorton opened this issue Jan 24, 2019 · 3 comments
Closed

When using project config unable to move assets #3707

johnfmorton opened this issue Jan 24, 2019 · 3 comments
Assignees

Comments

@johnfmorton
Copy link

johnfmorton commented Jan 24, 2019

Description

I get errors when using project config. I can't always update names of files. I can't move files. I can't upload new files directly and have them indexed into Craft's asset volumes.

Steps to reproduce

  1. Have useProjectConfigFile set to true
  2. In my case, I have a single asset volume http://share.jmx2.com/Q7zJBy
  3. Upload an image, myimage.jpg
  4. Double-clicking to rename the file works successfully. 'myimage.jpg' can be renamed to 'myimage2.jpg'
  5. Trying the same renaming using drop-down menu instead results in an error.
  6. This is just one manifestation of this issue. Trying to update Asset Indexes in the "Utilities" area of the control panel will always find missing images. The process does not actually clear or reindex. It always shows the same dialog box for "Missing folders and files". See: http://share.jmx2.com/r5bGTq
  7. After running clear caches and index all caches from the command line, a new "folder" called "." showed up in the control panel. See: http://share.jmx2.com/6FqrtB

Additional info

  • Craft version: Craft CMS 3.1.3 (see: http://share.jmx2.com/i9wfWZ)
  • PHP version: 7.3
  • Database driver & version: MySQL 5.5.5
  • Plugins & versions: Guest Entries is the only plugin

@khalwat helped me with some debugging and may have additional information to add.

Here is the stack trace for the error. # 2 below seems to show a "getFolderById" being passed a UID instead of an ID. (Thanks, Andrew.)

Stack trace:
#0 /home/forge/mystagingsite.com/vendor/craftcms/cms/src/web/ErrorHandler.php(76): yii\base\ErrorHandler->handleError(8, 'A non well form...', '/home/forge/att...', 379)
#1 /home/forge/mystagingsite.com/vendor/craftcms/cms/src/services/Assets.php(379): craft\web\ErrorHandler->handleError(8, 'A non well form...', '/home/forge/att...', 379, Array)
#2 /home/forge/mystagingsite.com/vendor/craftcms/cms/src/controllers/AssetsController.php(408): craft\services\Assets->getFolderById('19df8865-58de-4...')
#3 [internal function]: craft\controllers\AssetsController->actionMoveAsset()
#4 /home/forge/mystagingsite.com/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#5 /home/forge/mystagingsite.com/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#6 /home/forge/mystagingsite.com/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('move-asset', Array)
#7 /home/forge/mystagingsite.com/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('move-asset', Array)
#8 /home/forge/mystagingsite.com/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('assets/move-ass...', Array)
#9 /home/forge/mystagingsite.com/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application->runAction('assets/move-ass...', Array)
#10 /home/forge/mystagingsite.com/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#11 /home/forge/mystagingsite.com/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#12 /home/forge/mystagingsite.com/web/index.php(21): yii\base\Application->run()
#13 {main}
2019-01-24 10:35:35 [-][1][-][info][application] $_GET = [
    'p' => 'admin/actions/assets/move-asset'
]
@andris-sevcenko
Copy link
Contributor

Can you update to Craft 3.1.4 and see what's resolved and what's not?

After running clear caches and index all caches from the command line, a new "folder" called "." showed up in the control panel
I fixed a few command line indexing issues so this might be resolved.

Trying to update Asset Indexes in the "Utilities" area of the control panel will always find missing images.
There was also a bug fixed related to soft-deleted Assets showing up in that dialog, but that's fixed in 3.1.4, too.

Fixed a bug where renaming an asset file was impossible using the element action.
Just pushed a fix for this.

Here is the stack trace for the error. # 2 below seems to show a "getFolderById" being passed a UID instead of an ID. (Thanks, Andrew.)
This I cannot reproduce. If you still encounter this after updating to 3.1.4, can you get in touch over [email protected]?

@johnfmorton
Copy link
Author

I have now updated to 3.1.4. This addressed some issues but not all.

Success:

  1. I can now upload a replacement file for an asset and it is replaced successfully.
  2. I can now try to upload a file of the same name and the "replace" and "keep both" work successfully.
  3. The Update Assets also works successfully.

Remaining issue:

  1. I am still unable to rename a file using the "wheel" dropdown. I can update a filename by double-clicking though. See this GIF of the error in action.
    http://share.jmx2.com/YPEWZE

@andris-sevcenko
Copy link
Contributor

This has been resolved in 512847a. Should be working with the next release!

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

No branches or pull requests

2 participants