Giter Club home page Giter Club logo

Comments (8)

danielbachhuber avatar danielbachhuber commented on July 23, 2024 1

Hi @gnanet,

This was implemented in wp-cli/wp-cli#3751

from media-command.

gnanet avatar gnanet commented on July 23, 2024

Sorry to follow-up with this, but if the functionality is already there, then i need to debug the concrete issue somehow, but with --debug i did not get any extra information:

wp --debug media regenerate 1038
Debug (bootstrap): No readable global config found (0.283s)
Debug (bootstrap): No project config found (0.284s)
Debug (bootstrap): argv: /usr/local/bin/wp --debug media regenerate 1038 (0.285s)
Debug (bootstrap): ABSPATH defined: /var/www/vhosts/THEDOMAIN/httpdocs/ (0.289s)
Debug (bootstrap): Begin WordPress load (0.29s)
Debug (bootstrap): wp-config.php path: /var/www/vhosts/THEDOMAIN/httpdocs/wp-config.php (0.29s)
Debug (bootstrap): Loaded WordPress (1.422s)
Debug (bootstrap): Running command: media regenerate (1.431s)
Found 1 image to regenerate.
Warning: 1/1 Couldn't regenerate thumbnails for "ACBAR (Exzenter) – Getriebe" (ID 1038).
Error: No images regenerated.

from media-command.

danielbachhuber avatar danielbachhuber commented on July 23, 2024

Hi @gnanet,

GitHub issues are meant for enhancement requests and specific, reproducible bugs, not for general support questions. Bug reports need to be reproducible with a fresh WordPress install. If your issue only reproduces in your environment, then it's likely specific to your environment. For support options, please review http://wp-cli.org/#support

from media-command.

gnanet avatar gnanet commented on July 23, 2024

I will check the support options, and hope to find a way to get more debug info to see if it is reproducible, or only a separated issue. Thank you

I will have to inspect the condition of no metadata could be generated for PDFs if restricted to a specific image size because the PDF was imported by the media command, and initially no thumbnail got generated, and this happens also on regenerate, but no image size was manually specified.

from media-command.

gnanet avatar gnanet commented on July 23, 2024

I promise this is the last update, if i find any really reproducible bug i open a separate issue:

In the database i found no _wp_attachment_metadata field for the PDF in question, and manually adding a properly serialized value, based on other PDF-s did not help either. Then I used the nvola fork of force-regenerate-thumbnails which had no problems with the generation.

from media-command.

danielbachhuber avatar danielbachhuber commented on July 23, 2024

Can you provide steps to reproduce (including associated test data), please?

from media-command.

gnanet avatar gnanet commented on July 23, 2024

Ofcourse, not later than tomorrow late afternoon, because i have 117 PDF-s to be imported.
I will replay the process, document all steps including the relevant database content state on every step.

But I have a bad feeling that one of the plugins (most suspect is WP Download Manager Pro) hacks itself into the upload process as described in this stackoverflow comment which causing the wp_generate_attachment_metadata to return an empty array, but not die with some error.

from media-command.

grappler avatar grappler commented on July 23, 2024

I was having the same problem. After a bit of digging I realized that wp_generate_attachment_metadata() is failing silently when either wp_get_image_editor()
or $editor->save( $preview_file, 'image/jpeg' ); returns an error.

I have created a patch to fix this: https://core.trac.wordpress.org/ticket/35959

from media-command.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.