Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
haralake opened this issue Mar 9, 2023 · 11 comments

Comments

@haralake
Copy link

haralake commented Mar 9, 2023

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 haralake changed the title The pagefinder field does not adopt the link when we change the language on a multilingual site The Tailor pagefinder field does not adopt the link when we change the language on a multilingual site Mar 9, 2023
@daftspunk
Copy link
Member

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
Copy link
Member

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

Thanks!

@haralake
Copy link
Author

haralake commented Mar 10, 2023

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.

@daftspunk
Copy link
Member

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

@haralake
Copy link
Author

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

@daftspunk
Copy link
Member

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

@daftspunk daftspunk reopened this Mar 21, 2023
@haralake
Copy link
Author

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"
        }
    }
}

@daftspunk
Copy link
Member

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

@haralake
Copy link
Author

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

@daftspunk
Copy link
Member

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.

@uitlaber
Copy link

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)

@daftspunk daftspunk reopened this Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants