Add Files Support

Created on 23 February 2018, about 7 years ago
Updated 6 August 2024, 8 months ago

Is it possible to include files? This was in XML Sitemap but I noticed its not an option here. I have a site where I want a sitemap of just all the files.

✨ Feature request
Status

Needs work

Version

4.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡§πŸ‡·Brazil rafmagsou

    Resolve extra issues with most recent 4.x version

  • πŸ‡§πŸ‡·Brazil rafmagsou

    Fix, error when entity generation tries to get file entity

  • πŸ‡©πŸ‡ͺGermany gbyte Berlin

    Please create a merge request so the review/merging process is smoother.

  • πŸ‡§πŸ‡·Brazil rafmagsou

    Sorry, I'll sooner, first I need to reach a fully version of patch 100% funcional and tested

  • Just adding a new verification. In case that the field "link_count" exists, the hook update 8305 will not be runned again, since this hook is beeing called on hook 8407 and in some cases this made the update fail.

  • Removed the truncate() from the code on #48, this way will not be necessary run the sitemap build after the hook execution

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    32 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.2 & pgsql-14.1
    last update over 1 year ago
    32 pass
  • πŸ‡ΊπŸ‡ΈUnited States emanaton

    Reroll of the excellent work in #49 for the 4.1.7 branch:

  • πŸ‡ΊπŸ‡ΈUnited States emanaton

    Reroll of the excellent work in #49 for the 4.1.7 branch, this time without bugs!!!

  • πŸ‡§πŸ‡¬Bulgaria vflirt

    Thank you for working on this however it is not working.
    In patch 40 there was added section to support "overrides_entity_type" to be array however in 43 and after that was removed. As a result of that removal the isOverwrittenForEntityType for file is always false because the check $plugin['settings']['overrides_entity_type'] === $entity_type_name will always fail. I will provide updated patch soon.

  • πŸ‡§πŸ‡·Brazil murilohp

    The #51 works great but it has some unnecessary files like .idea/php.xml, .idea/workspace.xml, .idea/vcs.xml, this new patch removes them making it easier to review.

  • πŸ‡ΊπŸ‡ΈUnited States emanaton

    Ha! Sorry about that. Thanks for the cleanup of me file-piddle there, murilohp.

  • πŸ‡ΊπŸ‡ΈUnited States mikepadiernos

    The patch from #53 had a slight issue that ended up redeclaring function simple_sitemap_update_8408() so I ended up changing the second as function simple_sitemap_update_8409().
    Other than that everything else remains the same to #53

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update 12 months ago
    32 pass
  • πŸ‡ΊπŸ‡ΈUnited States newme154

    @mikepadiernos i'm still getting the 8408 issue here.

    Could not apply patch! Skipping. The error was: The " https://www.drupal.org/files/issues/2024-04-01/simple-sitemap-files-supp... β†’ " file could not be downloaded (HTTP/1.1 404 Not Found)

  • πŸ‡ΊπŸ‡ΈUnited States emanaton

    @newme154 - It appears that your error is due to an incorrect file name; you have 55 at the end instead of the53 that @mikepadiernos used. i.e. What you've pasted here show the file as https://www.drupal.org/files/issues/2024-04-01/simple-sitemap-files-support-for-version-4-2947456-55.patch, but it should have been https://www.drupal.org/files/issues/2024-04-01/simple-sitemap-files-support-for-version-4-2947456-53.patch (the later being the link from comment #55).

  • πŸ‡ΊπŸ‡ΈUnited States mikepadiernos

    @newme154 here's the proper path https://www.drupal.org/files/issues/2024-04-16/simple-sitemap-files-support-for-version-4-2947456-55.patch
    The date on your path was wrong and should be 2024-04-16 not 2024-04-01

  • πŸ‡ΊπŸ‡ΈUnited States fsayoub

    Can this patch be re-rolled for >4.2.1?

  • πŸ‡ΊπŸ‡ΈUnited States euk

    Here is the re-roll, however I haven't had a chance to test it yet

  • πŸ‡ΊπŸ‡ΈUnited States euk

    Apologies! Use this file instead.

  • πŸ‡ΊπŸ‡ΈUnited States euk
  • πŸ‡ΊπŸ‡ΈUnited States vetchneons

    I get an error when I try to set a mimetype that has a '.' in it in config.

    Drupal\Core\Config\ConfigValueException: application/vnd.ms-excel.addin.macroEnabled.12 key contains a dot which is not supported. in Drupal\Core\Config\ConfigBase->validateKeys() (line 209 of core/lib/Drupal/Core/Config/ConfigBase.php).

    This appears to be happening in the filterFileMimeTypesOptions in the patch.

    I don't know if this is the best approach, but could we change the '.' in the config key to something like a '_' instead so that the config can save?

      private function filterFileMimeTypesOptions(array $types_allowed = [], $by_extension = TRUE) {
        $all_file_types = $this->getAllFileMimeTypesOptions();
        $mimetypes_key = preg_replace('/\./', '_', $all_file_types['mimetypes']);
    
        if (empty($types_allowed)) {
          $options = ['' => $this->t('- All types -')];
          $options += array_combine($mimetypes_key, $all_file_types['mimetypes']);
          return $options;
        }
    
        if ($by_extension) {
          return $this->filterFileMimeTypesOptionsByExtension($all_file_types, $types_allowed);
        }
    
        return $this->filterFileMimeTypesOptionsByMimeType($all_file_types, $types_allowed);
      }
    
  • πŸ‡ΊπŸ‡ΈUnited States vetchneons

    This is breaking with custom forms that extend EntityForm. I'm not sure where this should be addressed, but this breaks the loading of the access_scheme forms for workbench_access.

    Specifically this line, https://git.drupalcode.org/project/simple_sitemap/-/merge_requests/114/d...

    I created the MR from the existing patch. I'm not sure I have time to dedicate to working on this issue. Does anyone have any suggestions for fixing this? I'm not sure just checking if the method getBundleEntityType exists is enough.

Production build 0.71.5 2024