trilbymedia / grav-plugin-image-captions

MIT License
10 stars 3 forks source link

expects parameter 4 to be integer, string given" #11

Closed diomed closed 2 years ago

diomed commented 6 years ago

Got this error upon installation and enabling plugin:

InvalidArgumentException thrown with message "DiDom\Document::load expects parameter 4 to be integer, string given"

Stacktrace:

#15 InvalidArgumentException in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/user/plugins/image-captions/vendor/imangazaliev/didom/src/DiDom/Document.php:222
#14 DiDom\Document:load in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/user/plugins/image-captions/vendor/imangazaliev/didom/src/DiDom/Document.php:56
#13 DiDom\Document:__construct in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/user/plugins/image-captions/image-captions.php:99
#12 Grav\Plugin\ImageCaptionsPlugin:processFigures in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/user/plugins/image-captions/image-captions.php:57
#11 Grav\Plugin\ImageCaptionsPlugin:onOutputGenerated in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/vendor/symfony/event-dispatcher/EventDispatcher.php:184
#10 call_user_func in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/vendor/symfony/event-dispatcher/EventDispatcher.php:184
#9 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/vendor/symfony/event-dispatcher/EventDispatcher.php:46
#8 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/vendor/rockettheme/toolbox/Event/src/EventDispatcher.php:23
#7 RocketTheme\Toolbox\Event\EventDispatcher:dispatch in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/system/src/Grav/Common/Grav.php:283
#6 Grav\Common\Grav:fireEvent in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/system/src/Grav/Common/Processors/RenderProcessor.php:26
#5 Grav\Common\Processors\RenderProcessor:process in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/system/src/Grav/Common/Grav.php:132
#4 Grav\Common\Grav:Grav\Common\{closure} in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/system/src/Grav/Common/Grav.php:374
#3 Grav\Common\Grav:Grav\Common\{closure} in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/system/src/Grav/Common/Grav.php:350
#2 call_user_func_array in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/system/src/Grav/Common/Grav.php:350
#1 Grav\Common\Grav:__call in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/system/src/Grav/Common/Grav.php:133
#0 Grav\Common\Grav:process in /home/vol4_8/p4o.net/p4one_14997610/htdocs/lav/index.php:52
rhukster commented 6 years ago

I think something in your content is not able to be parsed. If I could get a copy of that page I could debug/fix this. Are you able to track this down to a specific page?

diomed commented 6 years ago

This is independent of any active theme, happens on home page.

screenshot_11

rhukster commented 6 years ago

Does it only happen on the homepage? Not on other pages? If so what does your homepage .md file look like?

lefloresg commented 5 years ago

Hello! I also ran to the same problem after installing the Quark Open Publishing theme. It installs the Image-caption plugin and it crashes. I made a fresh install and then just added the image-caption plugin and the site crashed again. I see there hasn't been any movement on this thread and I've googled the issue but haven't found a solution.

rhukster commented 5 years ago

Seems to be something related to Quark Open Publishing because i can't replicate this at all.

arielsbecker commented 5 years ago

Hi! Confirmed. Weirdly enough, if I install the plugin on my local computer, it works smoothly. Then, if I upload a mirror to my site (without touching anything during the process), it crashes.

I uploaded my grav site without problems. This issue arises when I try to run an exact copy of my local installation on a web host, so I suspect it has something to do with the php.ini configuration, as there's no database to worry about.