HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


error pasting new pics

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#110049 (In Topic #21855)

Fan in action

We are getting an error pasting pics in our wiki pages. Instead of showing the pic, you see this text:

ERROR: A resource, 366, requested within some Comcode (the attachment tag) does not exist.

Existing images in pages are ok, but any new edits cause this error above.

Loggin in as Admin, when I try to paste in a new pic, get this inline text, not the image:



Server: Win 2008 r2.
Error logs: nothing related to PHP, ocPortal
Windows updates: server last updated on Sept 12, have done edits since then.
Hard disc not full.

Any ideas why the ocPortal wiki is rolling over like this?
Thanks

Back to the top
 
Posted
Rating:
#110051

Fan in action

hmm, ok, inline text did not post in message above, it looks like this:

"open bracket"     
attachment type="inline" thumb="0" "close bracket"
378
"open bracket"  /attachment  "close bracket"
Back to the top
 
Posted
Rating:
#110055
Avatar

Hi,

Attachments are removed when no longer referenced, they're not intended as permanent media. So if you cut it out from one place, save, then paste the code you'd saved somewhere else, it would have lost the attachment by that point.

It is more appropriate to upload to the File/Media library and add image tags to reference from there — or train users to copy over before removing from the source page.

We'll consider making the behaviour configurable in the future.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#110063

Fan in action

Sorry if this is a stupid question, not sure what is meant by "Attachments are removed when no longer referenced" and "removing from the source page" in this context. These are wiki pages that had inline pics in them (copied from MS Word), simple inline cut n paste. The existing Comcode/pic has not been edited at all, the end user put new text and a new image at the bottom, then after saving all the old pics are gone and the brand new pic just pasted in shows the same error. Maybe that is the key to this issue, even brand new pics being pasted into a wiki show this same error after the page is saved. I probably should have mentioned that originally.

We saw similar behavior a while back, but instead of the errors we get now, the images simply disappeared with an X icon where the image used to be. That behavior ceased, ocPortal worked fine with new and existing images in edit mode up to last week.

These end users do not have access to the server and are not technical. They have to be able to simply copy and paste inline images, or at a minimum, attach an image to a wiki. I can then (hopefully?) be able to train them to reference that image in the text via a link. Please elaborate.

Thanks, all help greatly appreciated. I have no idea where to even start looking to fix this.
Back to the top
 
Posted
Rating:
#110067
Avatar

I have put a workaround in this hotfix:
0002045: Cutting and pasting images, workaround to misunderstanding - ocPortal feature tracker

It's not a bug, so the workaround involves turning on a new hidden option.

No behaviour has changed recently, likely users just started saving after cutting or some similar subtle change in their process.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#110070

Fan in action

Thanks for response Chris. The explanation in the log entry really helps understand what is going on.

This description:
Some users may paste images into the WYSIWYG editor ... then cut them into the clipboard, save the original resource that had them, paste them elsewhere and save that, and find they are lost.

That is not all that we are seeing. The scenario is:
1. wiki page built and edited months/weeks ago. All images ok.
2. edit page
3. paste in a pic, usually at the bottom of the page. Sometimes, don't edit anything, just go into edit mode.
4. save page
5. now ALL pics, new and old, are either deleted completely, or show the error previously mentioned.

It sounds like the disable_attachment_cleanup flag should clean up our situation too. Will let you know how it turns out.

As mentioned previously, my guess is the functionality of the cleanup works fine on LAMP, and probably Win 2012 server. But since our server is stuck on Win 2008, who knows what MS nonsense is killing PHP.  To anyone else reading this thread, I think it is very impressive that ocPortal even supports this goofy old server OS. It shows just how solid the product is.



Back to the top
 
Posted
Rating:
#110089

Fan in action

hotfix installed, old and new pics behaving themselves.

Note to all: best to hit preview button in editor before saving. That seems to allow the pics to show, and not an "attachment link".
 
Thanks Chris.

 :thumbs:
Back to the top
 
Posted
Rating:
#110110
Avatar

Ok, thanks for the extra information. I have run some tests. I did find a different bug which I've fixed. I know in the past there was an attachment loss bug, so perhaps this was fixed already also.

Anyway, things seem fine now. If anyone finds an issue checking after the next version we can re-visit.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: