List medias that could not be retrieve

Created on 21 October 2024, 8 months ago

Problem/Motivation

Some media could not be retrieved because the source is private or similar, oembed gives a message like "Could not retrieve the remote URL".

Proposed resolution

List the resources that can not be retrieved.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

    After talking with @tunic and @lpeidro we decided that this fits better on the submodule insights.
    It will try to extract the error related or hook to the fetcher resource.

  • Pipeline finished with Success
    3 months ago
    Total: 183s
    #463291
  • Pipeline finished with Success
    3 months ago
    Total: 134s
    #463303
  • Pipeline finished with Success
    3 months ago
    Total: 238s
    #463337
  • Pipeline finished with Success
    3 months ago
    Total: 155s
    #463345
  • 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

    Ready to review https://git.drupalcode.org/project/xray_audit/-/merge_requests/74#note_4...

    The strategy was to create a decorator that registers when a resource gives an exception, it saves on a xray_audit_insight table with the message and the url.

    https://git.drupalcode.org/project/xray_audit/-/merge_requests/74/diffs#...

      public function fetchResource($url) {
        try {
          return $this->resourceFetcher->fetchResource($url);
        }
        catch (ResourceException $e) {
          // Log the exception to the xray_audit_insight table.
          $this->insightReport->addInsightData(
            'external_resource',
            $e->getMessage(),
            $url
          );
    
          throw $e;
        }
      }
    

    We also created a External Resources task on Content Display group.

    If the module insight is enabled then it shows the resources that needs to be reviewed.

    Also, if there there are resources to be reviewed it shows it on the status report:

  • Pipeline finished with Success
    3 months ago
    Total: 257s
    #463360
  • Pipeline finished with Success
    3 months ago
    Total: 163s
    #463391
  • Pipeline finished with Success
    3 months ago
    #463427
  • Pipeline finished with Canceled
    3 months ago
    #464115
  • Pipeline finished with Success
    3 months ago
    #464117
  • Pipeline finished with Success
    3 months ago
    Total: 144s
    #464132
  • 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

    Solve all threads @tunic

  • 🇪🇸Spain tunic Madrid

    Thanks, it looks good to me!

    I would prefer to wait for comments from @lpeidro before committing this forward but I think it is ok to move it to RTBC.

  • Pipeline finished with Success
    3 days ago
    Total: 264s
    #535136
  • Pipeline finished with Success
    3 days ago
    Total: 152s
    #535199
  • Status changed to RTBC 3 days ago
  • 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

    We simplified the code and removed the table "xray_audit_insight", and we recalculated the external resources status on the xray audit and on the insights.

Production build 0.71.5 2024