Account created on 25 August 2008, over 16 years ago
#

Recent comments

🇧🇪Belgium falc0

I've created my "private" version of the Russion site with Hound in a docker container on my NAS (not going to share it because my NAS can't handle too much visiters :p)

Here are the steps I did (quick & dirty):

  1. Docker container
  2. version: "3"
    
    # More info at https://github.com/hound-search/hound
    services:
      hound:
        container_name: hound
        image: spyrolabs/hound-search:latest
        ports:
          - "8899:6080/tcp"
        volumes:
           - '/volume1/docker/hound/data:/data'
           - /var/services/homes/yvesAdmin/.ssh:/root/.ssh:ro
           
  3. small python script to get all contrib modules
  4. import requests
    from bs4 import BeautifulSoup
    from pathlib import Path
    import math
    import json
    
    # Define the directory and base URL
    directory = "/volume1/docker/hound/data"
    URL = "https://www.drupal.org/project/project_module?f[3]=sm_core_compatibility:8&solrsort=iss_project_release_usage+desc&op=Search"
    base_url = "git@git.drupal.org:project/{}.git"
    
    # Define the initial configuration
    config = {
        "max-concurrent-indexers": 2,
        "dbpath": "data",
        "title": "Hound",
        "health-check-uri": "/healthz",
        "vcs-config": {
            "git": {
                "detect-ref": "true"
            }
        },
        "repos": {}
    }
    
    # Function to fetch project names from a page
    def fetch_projects(page_num):
        page = requests.get(URL + '&page=' + str(page_num))
        soup = BeautifulSoup(page.content, "html.parser")
        projects = soup.find_all("div", class_="node-project-module")
        return [project.find("a")['href'].split('/')[-1] for project in projects]
    
    # Number of pages to scrape
    pages = 40
    
    # Scrape each page and add projects to the config
    for i in range(pages + 1):
        project_names = fetch_projects(i)
        for title in project_names:
            repo_url = base_url.format(title)
            config['repos'][title] = {
                "url": repo_url
            }
    
    # Define the path for the configuration file
    config_file_path = Path(directory) / 'config_test.json'
    
    # Save the updated configuration to the file
    with open(config_file_path, 'w') as file:
        json.dump(config, file, indent=4)
    
    print("Updated Hound configuration successfully.")
    

After that you can grep search all code and when you click on a line, you end up at GitLab.

🇧🇪Belgium falc0

Hi Graber,

I was able to replace the code from the patch in #15 📌 Create API for view provider modules to provide entity labels and bulk form keys Fixed with custom code but I would still add this to your codebase if possible.

🇧🇪Belgium falc0

Updated for current version 2.2.2

🇧🇪Belgium falc0

Had an error:
Error: Call to undefined method Drupal\node\Entity\Node::isProcessed() in Drupal\scheduled_transitions\ScheduledTransitionsAccessControlHandler->checkAccess() (line 55 of /app/web/modules/contrib/scheduled_transitions/src/ScheduledTransitionsAccessControlHandler.php).

Fixed it in the latest patch (see interdiff).

🇧🇪Belgium falc0

Rerolled #14 to work with latest version.
I saw a lot of added changes to the patches in #18 and #20. Not sure if these are needed and they where not applying.

🇧🇪Belgium falc0

Fixed labels not showing in nested groups.

🇧🇪Belgium falc0

My attempt to fix rendering nested groups

I skipped comments in #9 for now.

🇧🇪Belgium falc0

For me some fields where not hidden when they should've been hidden. Updated the patch from #11 to fix that.

🇧🇪Belgium falc0

For me patch #29 works, except for some entity reference fields that are still required. I added some code to the patch to fix my use-case.

🇧🇪Belgium falc0

Patch #45 doesn't work for me. It gives me this error:

TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in array_filter() (line 436 of modules/contrib/views_bulk_edit/src/Form/BulkEditFormTrait.php).

The problem that triggers the error is that the values are no longer in the $form_state->getValues() but I do find them in the input.

$field_data = $form_state->getValue([$entity_type_id, $bundle]);

So if I replace this line with this, it works but I don't think this is a good solution.

$field_data = $form_state->getValue([$entity_type_id, $bundle]);
        if (!isset($field_data['_field_selector'])) {
          $input_data = $form_state->getUserInput();
          $field_data = $input_data[$entity_type_id][$bundle];
        }
🇧🇪Belgium falc0

Hi Graber,

I was able to fix it in this patch: https://www.drupal.org/project/views_bulk_edit/issues/3047358#comment-15... 🐛 Entity is not validated prior to being saved Needs review

But the problem with the HTML remains.

Do you have a suggestion where I should fix the markup, other than the fix I added in ViewsBulkOperationsActionCompletedTrait?

Thanks!

🇧🇪Belgium falc0

Going further on the patch in #4:

Views_bulk_operations expects $result['message'] to be a MarkupInterface. I changed the patch for this and added the type "error" so the messages get the correct status.

Production build 0.71.5 2024