[Solved] Url.js:234 Uncaught TypeError: url.indexOf is not a function

I am uploading content from the Volto Text Editor, and when I add an image to the properties of the Page content type, I save and go to edit the page, and the following error occurs:

Url.js:234 Uncaught TypeError: url.indexOf is not a function
    at isInternalURL (Url.js:234:1)
    at UnconnectedImageInput (ImageWidget.jsx:183:1)
    at renderWithHooks (react-dom.development.js:16305:1)
    at mountIndeterminateComponent (react-dom.development.js:20074:1)
    at beginWork (react-dom.development.js:21587:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
    at invokeGuardedCallback (react-dom.development.js:4277:1)
    at beginWork$1 (react-dom.development.js:27451:1)
    at performUnitOfWork (react-dom.development.js:26557:1)
    at workLoopSync (react-dom.development.js:26466:1)
    at renderRootSync (react-dom.development.js:26434:1)
    at performSyncWorkOnRoot (react-dom.development.js:26085:1)
    at flushSyncCallbacks (react-dom.development.js:12042:1)
    at react-dom.development.js:25651:1
isInternalURL	@	Url.js:234
UnconnectedImageInput	@	ImageWidget.jsx:183
renderWithHooks	@	react-dom.development.js:16305
mountIndeterminateComponent	@	react-dom.development.js:20074
beginWork	@	react-dom.development.js:21587
callCallback	@	react-dom.development.js:4164
invokeGuardedCallbackDev	@	react-dom.development.js:4213
invokeGuardedCallback	@	react-dom.development.js:4277
beginWork$1	@	react-dom.development.js:27451
performUnitOfWork	@	react-dom.development.js:26557
workLoopSync	@	react-dom.development.js:26466
renderRootSync	@	react-dom.development.js:26434
performSyncWorkOnRoot	@	react-dom.development.js:26085
flushSyncCallbacks	@	react-dom.development.js:12042
(anonymous)	@	react-dom.development.js:25651
XMLHttpRequest.send		
push.../../../node_modules/.pnpm/superagent@3.8.2/node_modules/superagent/lib/client.js.Request._end	@	client.js:772
push.../../../node_modules/.pnpm/superagent@3.8.2/node_modules/superagent/lib/client.js.Request.end	@	client.js:676
(anonymous)	@	Api.js:102
push../src/helpers/Api/Api.js.constructor.methods.forEach.<computed>	@	Api.js:63
push../src/middleware/api.js.apiMiddlewareFactory	@	api.js:217
push.../../../node_modules/.pnpm/redux-thunk@2.4.2_redux@4.2.1/node_modules/redux-thunk/es/index.js.middleware	@	index.js:20
push.../../../node_modules/.pnpm/connected-react-router@6.8.0_history@4.10.1_immutable@3.8.2_react-redux@8.1.2_@types+react-do_33bynhyxxtmgrbg6e2fysqujli/node_modules/connected-react-router/esm/middleware.js.routerMiddleware	@	middleware.js:22
push../src/middleware/storeProtectLoadUtils.js.protectLoadStart	@	storeProtectLoadUtils.js:58
push../src/middleware/blacklistRoutes.js.blacklistRoutes	@	blacklistRoutes.js:30
boundActionCreators.<computed>	@	bindActionCreators.js:8
componentDidMount	@	Edit.jsx:148
commitLayoutEffectOnFiber	@	react-dom.development.js:23305
commitLayoutMountEffects_complete	@	react-dom.development.js:24688
commitLayoutEffects_begin	@	react-dom.development.js:24674
commitLayoutEffects	@	react-dom.development.js:24612
commitRootImpl	@	react-dom.development.js:26823
commitRoot	@	react-dom.development.js:26682
finishConcurrentRender	@	react-dom.development.js:25981
performConcurrentWorkOnRoot	@	react-dom.development.js:25809
workLoop	@	scheduler.development.js:266
flushWork	@	scheduler.development.js:239
performWorkUntilDeadline

I am not programming or overriding any components of the slate editor at the moment, just loading content.

Question: Does this error corrupt the ZODB data, or is it a display error in Volto?

Below are my development versions:

Volto 18.23.0
Plone 6.1.2
plone.restapi 9.15.1
CMF 3.7
Zope 5.13
Python 3.12.11 (main, Jun 18 2025, 19:09:13) [GCC 12.2.0]
PIL 11.2.1 (Pillow)

Add-ons

@plone/volto-slate 18.5.0
@eeacms/volto-accordion-block 11.0.4
volto-subblocks 2.1.0
volto-form-block 3.13.0
volto-multilingual-widget 3.2.1
volto-gdpr-privacy 2.2.15
@mbarde/volto-fullcalendar-block 1.0.1
@kitconcept/volto-banner-block 1.1.0
@kitconcept/volto-button-block 3.0.3
@kitconcept/volto-bm3-compat 1.0.0-alpha.1
@kitconcept/volto-carousel-block 2.0.0-alpha.3
@kitconcept/volto-heading-block 2.5.0
@kitconcept/volto-highlight-block 4.4.0
@kitconcept/volto-introduction-block 1.1.0
@kitconcept/volto-logos-block 3.0.0-alpha.1
@kitconcept/volto-separator-block 4.2.1
@kitconcept/volto-slider-block 6.4.0
@kitconcept/volto-light-theme 7.0.0
volto-sevilla-imd-website 1.0.0-alpha.0

This error is blocking me; it is not allowing me to move forward with uploading content to the sites. PLEASE HELP ME.

Try to update to latest Volto: 18.29.1

Which content type field are you using when uploading the image?

1 Like

I can manage this issue thanks to the guidance of @sneridagh via the Discord channel

To fix the issue, I needed to do:

  • Upgrading the kitconcept.voltolighttheme package from the backend.
  • Upgrading the @plone/volto and @kitconcept/volto-light-theme packages from the frontend.

The solution is the following changes:

Edit the backend/pyproject.toml‎ file:

    "kitconcept.voltolighttheme==7.6.0",

Edit the frontend/mrs.developer.json file:

    "tag": "18.29.1",

Edit the ‎frontend/packages/my-policy-package/package.json‎ file:

  "dependencies": {
    "@kitconcept/volto-light-theme": "7.6.0"
  },

And executing the following commands

rm -rf frontend/core
rm -rf node_modules
rm -rf packages/my-policy-package/node_modules/
rm pnpm-lock.yaml
make install
make start

This will resolve the error.

1 Like