october icon indicating copy to clipboard operation
october copied to clipboard

The Tailor pagefinder field does not adopt the link when we change the language on a multilingual site

Open haralake opened this issue 1 year ago • 11 comments

The Tailor pagefinder field does not adopt the link when we change the language on a multilingual site. In the admin in the primary language you see this: Screenshot_2

and in the secondary language this: Screenshot_3

The result is that on multilingual sites you cannot work with the pagefinder field.

Another thing I noticed is that in every record you create with the pagefinder field in the admin interface and with "multisite:sync" enabled in the blueprint, you see all the entries (which are created depending on the languages you use) in the "Parent" field. Screenshot_4

haralake avatar Mar 09 '23 10:03 haralake

Hi @haralake

We could not reproduce the first issue; the link resolves for both sites, including across different themes. In your screenshot, the link has been set successfully, however, the URL is not displayed since it cannot resolve to any usable link.

Check to make sure that page selected exists in the theme for the selected site. It is possible for a link to be propagated from Site A using Theme A and when Site B uses Theme B the link can be unresolvable if the page name does not exist.

daftspunk avatar Mar 09 '23 23:03 daftspunk

The second issue will be fixed in v3.2.22 when it is released.

Thanks!

daftspunk avatar Mar 10 '23 02:03 daftspunk

Hi @haralake

We could not reproduce the first issue; the link resolves for both sites, including across different themes. In your screenshot, the link has been set successfully, however, the URL is not displayed since it cannot resolve to any usable link.

Hi @daftspunk ! I investigated it more and found that it happens when you have "multisite: sync" enabled in the blueprint that is responsible for creating records (pages). The problem has to do with the records that have been automatically created by the multisite: sync option. If you manually create the records that will be selected by the pagefinder, the problem does not occur.

haralake avatar Mar 10 '23 11:03 haralake

With this information, we still cannot reproduce this using a clean installation of October CMS:

  1. Ensure a secondary site exists
  2. Update the sitemap.yaml blueprint to use multisite: sync
  3. Navigate to Settings → Sitemap
  4. Create a record, select the homepage
  5. Navigate to the second site
  6. The Reference (pagefinder) field is populated normally

daftspunk avatar Mar 15 '23 22:03 daftspunk

With this information, we still cannot reproduce this using a clean installation of October CMS:

  1. Ensure a secondary site exists
  2. Update the sitemap.yaml blueprint to use multisite: sync
  3. Navigate to Settings → Sitemap
  4. Create a record, select the homepage
  5. Navigate to the second site
  6. The Reference (pagefinder) field is populated normally

Using a clean installation of latest October CMS v.3.2.23: With "multisite: sync" sync i'm getting the same issue

With "multisite: true" and manually creating records: true

haralake avatar Mar 21 '23 13:03 haralake

Can you share your site configuration? It might be related to this.

daftspunk avatar Mar 21 '23 22:03 daftspunk

Can you share your site configuration? It might be related to this.

I'm using LEMP stack on Ubuntu server 20.04.3 with PHP 8.1.14 and Maria db v1:10.5.12 on windows Hyper-V virtual machine.

This is my composer.json:

{
    "name": "october/october",
    "description": "Built using October CMS: The Laravel-Based CMS Engineered For Simplicity",
    "type": "project",
    "homepage": "https://octobercms.com",
    "license": "proprietary",
    "require": {
        "php": "^8.0.2",
        "october/rain": "^3.2",
		"october/all": "^3.0",
        "laravel/framework": "^9.0",
        "rainlab/translate-plugin": "^2"
    },
    "require-dev": {
        "phpunit/phpunit": "^8.5|^9.0"
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate --ansi"
        ],
        "post-autoload-dump": [
            "System\\Console\\ComposerScript::postAutoloadDump"
        ],
        "post-update-cmd": [
            "System\\Console\\ComposerScript::postUpdateCmd"
        ],
        "pre-package-uninstall": [
            "System\\Console\\ComposerScript::prePackageUninstall"
        ],
        "test": [
            "phpunit --stop-on-failure"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "allow-plugins": {
            "composer/installers": true
        }
    },
    "autoload": {
        "psr-4": {
            "System\\Console\\": "modules/system/console"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "repositories": {
        "octobercms": {
            "type": "composer",
            "url": "https://gateway.octobercms.com"
        }
    }
}

haralake avatar Mar 23 '23 13:03 haralake

Sorry. Please navigate to Settings → Manage Sites and show the site configuration are you using.

daftspunk avatar Mar 23 '23 21:03 daftspunk

Sorry. Please navigate to Settings → Manage Sites and show the site configuration are you using.

Screenshot_1

Ok, i forgot to mention important information.

  • Put "multisite:sync" on wiki/article.yaml
  • Put "multisite:sync" on site/sitemap.yaml
  • Create a new article with Content -> Article
  • Go to Settings -> Sitemap
  • Create new sitemap entry and choose the article name you created before with pagefinder, then save.
  • You will see that the pagefinder link is ok on the first language but if you change the language there is no link on pagefinder .

The issue happens only if you use "multisite:sync" on both wiki/article.yaml and site/sitemap.yaml

haralake avatar Mar 24 '23 15:03 haralake

Hello

I still can't reproduce this using identical settings on the demo site and a fresh installation. It is possible if the "Edit theme" (set via Editor) is set to a theme that doesn't have the page, it will show empty like this, but it is harmless. Click the "Replace" button and you might see that the page does not appear in the dropdown.

daftspunk avatar Apr 06 '23 07:04 daftspunk

Hello, I realized that when selecting Reference in the list, the elements have the wrong id (In the dropdown itself). Because of this, the correct URL is not displayed on the multisite. (/default)

uitlaber avatar Mar 23 '24 00:03 uitlaber