Jump to content
EyeDentify

Cryptic Error Message When trying to Delete Images On a Page (PW 3.0.139)(Solved)

Recommended Posts

Hello Dear PW Gurus.

Hope you fair well in these Corona Crisis times.

Anyhow, i have a problem with a Cryptic error message that shows up when i am trying to Delete images out of a Images field.
The Error message does say a little but it does not make sense to me why i can´t delete the images because of it.

Is it some permission issue perhaps?

I will attach screenshots of it and what i did prior to it.
I am from sweden so ignore the funny words here and there.

Hope you all can send me on the right track.

i am running PW 3.0.139 on this install.

Step1:

error_deleting_images_1.thumb.png.c7e2646a9ec2ee2dc9a10814f0c5e921.png

Step 2: Select the images with the trashcan symbol

error_deleting_images_2.thumb.png.e0ac923363c99d4f3adaa252a14af110.png

 

Step 3: Cryptic Error message

error_deleting_images_3.thumb.png.f7f516faf39ff9de0bdc7cfb9b94af2e.png

I am scratching my head on this one, have not seen this before.

Thankfull for all help.

/EyeDentify

Share this post


Link to post
Share on other sites

It looks like you have a textformatter enabled for file descriptions. Try to de-activate that HTML purifier textformatter.

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, dragan said:

It looks like you have a textformatter enabled for file descriptions. Try to de-activate that HTML purifier textformatter.

Hello Dragan.

Thanks for getting back to me, i tryed disabling the formating option you talked about but the same error message shows up.

Strange, i don´t get why.

Share this post


Link to post
Share on other sites

I did some more investigating because no one seems to know why the error is happening.

I did the following.

1. Created an empty template file and uploaded to my PW install.
2. Created a completly new image field
3. Assigned that new image field to my template

4. i Created a hidden page with that template with the new image field
5. Uploaded five test images to that field on that page, saved it
6. Started edit on that page and deleted a random image

And for some strange reason there was no error message this time.

But the problem resists on the Page i mentioned in my original post.
Is there some kind of corruption somewhere i should look for?

Maybe i have to remove the page and add it again?

Share this post


Link to post
Share on other sites

Now i have done the following:

I think the offending party in this drama was that "Images" field in the orignal Template.

I made a new template and a new Images field and transfered images to that, and now it seems to work fine.

Do not now why that Images field became corrupt, perhaps after an update to 3.0.139?

 

Share this post


Link to post
Share on other sites

Made more testing with the what i thought was the "offending" images field in the first post.

And now i created a new test template and added that field to it and tested uploading images to it on a test page.

All of a sudden, no error message and the image was deleted as expected.

So this is just a very confusing event.

I am just glad that its seems to work again.

Wanted this thread to be here in case someone else got this problem and wanted a clue to how to solve it.

Also Enabling or Disabling the HTML Encoding formating for Filedescription output does not seem to mather which was the first thought after the tip by Dragan.

I just leave this here as info for others.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By psy
      I've searched, and maybe missed, the solution. I have a 'normal' images field and uploading images with a file size greater than 10Kb is fine. Any image size smaller results in the never-ending spinner and no upload.
      No min/max width/height set on image uploads in admin, ie just the defaults.
      Any ideas on how to fix?
      Using:
      PW: 3.0.175
      PHP: 7.3
      Marking it as "Resolved" rather than "Solved" as it auto-magically fixed itself. No idea whether PW, PHP, or just an internet hiccough... All good now 🤞
    • By rjgamer
      Hi,
      is there a hook after the current (active) page got created? Or which method got called in the Page class after the Constructor of the current page got initialized?
      Thanks.
       
    • By rjgamer
      Hi guys,
      the field "redirect_last" of type DateTime got not updated. The update on the field "redirect_counter" works and got saved.
      Does anybody know what I did wrong in my code?
      if ($input->urlSegment(1) === 'redirect') { $page->of(false); $page->redirect_last = time(); $page->redirect_counter += 1; if ($page->save('redirect_counter')) { $session->redirect($page->website_url, 302); } } Thanks.
    • By totoff
      Dear all,
      tomorrow I'll have to introduce some editors on how to upload and edit images in image fields in Processwire. The site in question is quite image rich and I've spent some time to serve the appropriate images via scrcset already cropped for different screen sizes.
      However, the backend offers a lot of possibilities to manipulate images and most of them I'm not familiar with because as a developer I've never spent much thinking on what all the features might be good for … Yet I'm concerned that my editors work on images in the backend may interfere with my optimization strategies in the templates.
      Is there a general rule of thumb what content editors should do or not do with images in order not to break srcset strategies etc.? Maybe there is already a source of information you could point me to?
      Your recommendations are much appreciated!
    • By totoff
      Dear all,
      I'm upgrading an older side with the new custom fields for images feature as of 3.0.142. My image field is set to "Automatic" and holds a bunch of images together with their respective description on each page. New custom fields include "caption" among others and to make my live easier I I'm trying to populate "caption" with the value from the (default) description field. But unfortunately I can't seem to find out how to save the newly set values. This is my code:
      <?php foreach (page()->images as $image) { $image->set('caption', $image->description); bd($image->caption); echo files()->render("markup/views/view-card-image-fancybox.php", array('image'=>$image)); } ?> <?php $page->save(); bd($page->save()); ?> This sets the value as intended (see screenshot) but doesn't save it permanently to the database. What am I doing wrong?
      Thanks!
       

×
×
  • Create New...