Cannot link to pages anymore

Description:

Usually I set up my links in cwicly such that they link to a wordpress page rather than a static URL. This way, if the page’s permalink changes, all links to that page update automatically. Right now this does not work anymore. When I type in the page’s title in the link modal, it’s stuck loading.

Step-by-step reproduction instructions:

  1. Add a couple pages
  2. Open the Post Editor/Site Editor
  3. Add any block and add a link to it
  4. Select link source as static
  5. Type in any page’s title
  6. Notice that the search bar stays in loading mode and never suggests any wordpress page to link to

Screenshots, screen recording, code snippet

Environment info

  • WordPress version: 6.6.2
  • Cwicly Plugin version: 1.4.1.8

I just tested this on 1.4.3 and it is functioning correctly.

1 Like

Confirmed, also working fine for our sites using 1.4.1.8 - 1.4.3.

@marc, perhaps check that there are no other factors preventing asynchronous loading of data.

I recommend checking your browser console for errors as a first step.

Thanks for checking @hopscotch and @StrangeTech, really appreciate it!

When I’m in the cwicly editor and refresh the page I get a bunch of warnings and this one error:

[Error] Unhandled Promise Rejection: TypeError: n.createElement is not a function. (In 'n.createElement("style")', 'n.createElement' is undefined)
	(anonymous function) (index.js:3:281929)
	promiseReactionJob

And when I start typing anything into the search field inside the link modal, I get the following error:

[Error] SyntaxError: Invalid regular expression: invalid group specifier name
	RegExp (block-editor.min.js:21:221660)
	(anonymous function) (block-editor.min.js:21:221660)
	qa (block-editor.min.js:21:221714)
	(anonymous function) (block-editor.min.js:21:222392)
	updateSuggestions (block-editor.min.js:21:209696)
	updateSuggestions
	p (compose.min.js:9:17293)

I have no idea if these two are related in any way. Has anybody encountered this error before and knows if there’s a fix or is this something the cwicly team needs to tackle?

1 Like

Hello @marc,

Those errors don’t suggest any specific error.
Can you let me know if using a core Gutenberg block, the same thing happens?

Hi @Louis , thanks for reaching out!

I can confirm that the same thing happens when using a core Gutenberg block (I tested with Gutenberg paragraph and heading).

It does not happen inside the Classic Editor block, though (either inside the cwicly editor or outside when editing CPTs where I disabled editor mode from the ACF settings)

I don’t see such an issue from the version you’re using to 1.4.4.

1 Like

Thanks for checking @jornes ! Since I’m the only one facing this issue, I tested the following on a copy of the project:

  1. Deactivate all plugins except cwicly
  2. Clean the database with WP Optimize
  3. Check the cwicly editor (1.4.1.8) and try to link to a page => fail
  4. Update cwicly to latest version (1.4.4)
  5. Clean database again
  6. Regenerate HTML, CSS, Tailwind, etc
  7. Check the cwicly editor and try to link to a page => fail

Is there anything else I can try for debugging on my end or is this the point where the support team needs to check on my installation? If so, I’ll be happy to grant you access :slight_smile:

Cheers
Marc

EDIT: I also checked installing cwicly 1.4.1.8 on a completely fresh Wordpress installation and there everything works fine.

Hello @marc,

Please send me a PM with your site details if possible so I can take a quick look at what is happening.
It would seem that this isn’t related to Cwicly specifically (we’re using the default Gutenberg link component).

Thanks in advance.

Hi @Louis thanks for the offer, really appreciate it!

Fortunately, it won’t be necessary. I just found out that the root cause is somehow linked to my browser cache :man_facepalming:. I logged into my site using another browser where I could safely wipe all browser data, cache, etc and there the page linking works fine. I had previously cleared the site data on my main browser specifically for the site hosting my wordpress installation, but it seems that a complete browser cache wipe was necessary in my case.

Thanks everyone for checking and helping me narrow down the issue. I’m sorry that in the end the solution is not too exciting :melting_face:

3 Likes