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

Cannot choose a page #32

Open
pvtryk opened this issue Jan 31, 2024 · 3 comments
Open

Cannot choose a page #32

pvtryk opened this issue Jan 31, 2024 · 3 comments

Comments

@pvtryk
Copy link

pvtryk commented Jan 31, 2024

I would like to report a bug appearing in version 1.4.6.

When I select a collection and then try to choose a page, it always shows "No options." - I have about 20 published pages.

I am using Strapi 4.15.5.
Screenshot 2024-01-31 at 20 54 20

@pvtryk
Copy link
Author

pvtryk commented Jan 31, 2024

I checked and it works with version 1.3.9

@PowerMugen
Copy link

PowerMugen commented Feb 20, 2024

Hello, I have the same issue with 1.4.7 and 1.4.8
Strapi is 4.17.1
Node 18.19.0

I can add an external link and it works fine but for internal links on all my entities it don't work.

@PowerMugen
Copy link

PowerMugen commented Feb 21, 2024

After further test I have manage to use the plugin with strapi 4.17.1 and the latest version.
I have some notes, first of all : it's a great module. I'm really glad it exists for my purpose.
The site we build has many entities and we need internal links between pages and thoses entities.

And right now it seems I need to be using "path" and "title" fields on my strapi entities for the plugin to be working as intended.
But my strapi is configured with fields named : "slug" and "name"

The field "slug" is setup for every entity and we need this slug to be used for building the link.

In the strapi plugins.ts file I put this basic conf that feels suits my need.
"internal-links": { enabled: true, config: { environment: "test", domains: { default: { test: "https://front.docker.localhost", production: "https://prod.com", }, }, }, },

For the custom field on my entity it's like that
"internal": { "type": "customField", "options": { "title": "name", "slug": "slug", "noTitle": false }, "customField": "plugin::internal-links.internal-link" }

But using "slug" here does nothing and I could not add any link.
If in the plugin source code I force :
server/utils/constant.ts DEFAULT_PAGEBUILDER_PATH_FIELD = "slug"
and
admin/src/utils/constant.ts DEFAULT_PAGEBUILDER_PATH_FIELD = "slug"

Then I can use "slug" as a field and everything works fine.
As I understand the readme this field should be override by the customfields config ?
(I feel it's the same with using a field named "name" instead of "title" but I need to test this more.)

Also I don't have a "platform" entity type and I get 403 errors on this url /content-manager/collection-types/api::platform.platform?page=1&pageSize=999 when I'm editing entities in strapi.
Perhaps some tests needs to be added for platform ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants