🇪🇸Spain @antcab

Account created on 14 January 2020, about 5 years ago
#

Recent comments

🇪🇸Spain antcab

I seem to remember that I did it that way, although in the end I didn't have to use Multisite

https://portal1.mydomain.es
https://portal1.mydomain.es/portal2

I have a multisite with this structure:

../htdocs/multisite/web/
          /sites/portal1
          /sites/portal2        <- portal2 is not a subfolder of portal1

In sites.php file:

          $sites['portal1.mydomain.es']='portal1'
          $sites['portal1.mydomain.es.portal2']='portal2'

In each settings.php file, i wrote the same in trusted_host_patterns

          Portal1 settings.php -->  $settings['trusted_host_patterns'] = [
                                                      '^portal1\.mydomain\.es$',
                                               ];

          Portal2 settings.php -->  $settings['trusted_host_patterns'] = [
                                                      '^portal1\.mydomain\.es$',
   

In apache sites-availabes:                                           ];

Portal 1:

<VirtualHost *:80>
          ServerName portal1.mydomain.es
          DocumentRoot /var/www/sds/htdocs/multisite/web
          ............
</VirtualHost>

Portal 2:

<VirtualHost *:80>
        ServerName portal1.mydomain.es/portal2
        DocumentRoot /var/www/sds/htdocs/multisite/web
          ............
</VirtualHost>

But the key is in what Umberto said:

you have to add a symlink for the folders in the website root folder?

ln -s . portal1    where "portal1" is the name of your subdirectory.
ln -s . portal2    where "portal2" is the name of your subdirectory.

I hope it helps you

🇪🇸Spain antcab

I had a problem with openAI ckeditor5 module.
I uninstalled it and all was fine again

Thank you very much.

🇪🇸Spain antcab

Hello.

I am a newbie developing modules.

What I want is to map an attribute from an external server oauth to a field created in the drupal user account.

That is:

  • on my openid server I have the 'center' attribute.
  • In the Drupal users account, I have created a center field (field_center).
  • In openid connect, I have created a client of type Generic OAuth 2.0.
  • In User claims mapping I see the center field created in the user, but I cannot map it to the openid attribute

How do I pass the value of the center to field_center?

I've tried creating the module as lykyd indicates, but no luck.

Drupal version: 10.2.5
Openid Connect Version: 3.0.0-alpha3

Thank you very much

🇪🇸Spain antcab

Hello.

I want to make the same.

https://portal1.mydomain.es
https://portal1.mydomain.es/portal2

I have a multisite with this structure:

../htdocs/multisite/web/
          /sites/portal1
          /sites/portal2        <- portal2 is not a subfolder of portal1

In sites.php file:

          $sites['portal1.mydomain.es']='portal1'
          $sites['portal1.mydomain.es.portal2']='portal2'

In each settings.php file:

          Portal1 settings.php -->  $settings['trusted_host_patterns'] = [
                                                      '^portal1\.mydomain\.es$',
                                               ];

          Portal2 settings.php -->  $settings['trusted_host_patterns'] = [
                                                      '^portal1\.mydomain\.es\/portal2$',
                                               ];

But i don't know how to configure apache virtual host. I've got:

<VirtualHost *:80>
          ServerName portal1.mydomain.es
          DocumentRoot /var/www/sds/htdocs/multisite/web

          Alias /portal2  /var/www/sds/htdocs/multisite/web

          Loglevel warn
          ErrorLog /var/www/sds/log/portal1_error.log
          CustomLog /var/www/sds/log/portal1_access.log vhost_combined

          ProxyPassMatch "^/(.*\.php)$" "unix:/run/php/php8.1-fpm-portal1.sock|fcgi://localhost/var/www/sds/htdocs/multisite/web/"
          ProxyPassMatch "^/update.php(/.*)?$" "unix:/run/php/php8.1-fpm-portal1.sock|fcgi://localhost/var/www/sds/htdocs/multisite/web/update.php$1"

          <Directory />
                    Options FollowSymLinks
                    AllowOverride None
          </Directory>

          <Directory /var/www/sds/htdocs/multisite/web>
                     DirectoryIndex /index.php index.php FollowSymLinks MultiViews
                     RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond  %{REQUEST_URI} !\.(ico|png|jpg|gif|css|js|html?)(\W.*)? RewriteRule ^ index.php [L]
                    AllowOverride All
          </Directory>
          <Directory /var/www/sds/data/public>
                    AllowOverride None
                    Require all granted
          </Directory>
          <Location /core/install.php>
                    Order Deny,Allow
                    Deny from all
          </Location>
</VirtualHost>

What do I have to do to configure and make the links work?

Thank you very much.

🇪🇸Spain antcab

Yes, that is exactly the error I have, an AJAX error inside a modal popup in the browser.

An error occurred while attempting to process /node/add/article?element_parents=field_image/widget/0&ajax_form=1&_wrapper_format=drupal_ajax: Cannot read properties of undefined (reading 'extend')

With administrator user, theres is no problem. Only when users has another role: authenticated user, anonymous user

Thanks

Production build 0.71.5 2024