strapi-webtools icon indicating copy to clipboard operation
strapi-webtools copied to clipboard

[BUG] URL pattern screen is not being loaded

Open SalahAdDin opened this issue 1 year ago • 1 comments

Bug report

Describe the bug

After setting up both the the sitemap plugins with the core, we want to generate the URL patterns, we go to the screen, and it does not load.

Steps to reproduce the behavior

  1. Go to Admin Panel
  2. Click on Webtools
  3. Click on URL Patterns
  4. See error

Expected behavior

We should see the screen available so we can edit the URL patterns.

Screenshots

image

Code snippets

If applicable, add code samples to help explain your problem.

System

  • Node.js version: v20.12.2
  • NPM version: 10.5.0
  • Strapi version: 4.24.4
  • Plugin version: 1.0.0-beta.11
  • Database: SQLLite
  • Operating system: Manjaro Linux

Additional context

I was using an old version of Sitemaps and I defined the URLs also; as there is no migration guide, I didn't migrate anything.

SalahAdDin avatar Jun 01 '24 20:06 SalahAdDin

@boazpoolman

From my investigation, I get that fetching the URL patterns always returns an empty array: image

It is a problem since the index requires to get not an empty array of patterns:

if (loading || !patterns.length) {
    return (
      <Center>
        <Loader>{formatMessage({ id: 'webtools.settings.loading', defaultMessage: 'Loading content...' })}</Loader>
      </Center>
    );
  }

Is it intended to be like that? Is there any extra step to add URL patterns?

From the documentation we get that screen is where we define the patterns!

SalahAdDin avatar Jul 03 '24 05:07 SalahAdDin

Hello @SalahAdDin , thanks for sending in the bug report. We want to create robust Strapi plug-ins and thus want to help you (and maybe others) with this experience.

Could you provide us with some more information? What are the contents of your wt_url_patterns table in the database? Maybe it is empty or missing a value?

Thanks for letting us know!

Mathijs

MSACC avatar Jul 22 '24 18:07 MSACC

Hi @SalahAdDin, I have tried to reproduce this issue and I can confirm that this is a problem. I'll update the label and we'll take a look at it soon. Hopefully I have informed you sufficiently, if you have any questions you can always contact us.

Kind regards, PluginPal.

TMSchipper avatar Jul 22 '24 19:07 TMSchipper

This issue has been fixed and released with v1.0.0-beta.12

boazpoolman avatar Jul 23 '24 06:07 boazpoolman