Webmastersite.net
Register Log In

Attached images on links not showing

Comments on Attached images on links not showing

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Dec 06, 2007 - 2:01 AM:

Having moved thedogscene.co.uk over to the new server the link attachments aren't showing. I uploaded all the attachments to the new server and they are definitely there.

So, I deleted one I attached and reattached it and although it attached ok it still doesn't show. I redid the templates on a test site before uploading them to thedogscene and attachments show perfectly on the test site, so it can't be the templates.

I have checked the admin and can't see anything wrong. The upload path is correct (but the category attachments show fine anyway)

But then I went to http://www.thedogscene.co.uk/dog-breeds/shar-pei/ and low and behold one of the attachments is actually showing! This is one I did not upload.




Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 07, 2007 - 10:09 PM:

In phpmyadmin, is the wsnlinks_attachments table empty?
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Dec 08, 2007 - 12:22 AM:

Paul wrote:
In phpmyadmin, is the wsnlinks_attachments table empty?


cripes - there are only 3 items in there! How can I get the others in there?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 08, 2007 - 9:39 PM:

Import the table data from your backup or wheverever you were transfering them from.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Dec 09, 2007 - 12:55 AM:

Paul wrote:
Import the table data from your backup or wheverever you were transfering them from.


Looks like I've lost them :-(

I went to my back-up but there are only three attachments in there! Sadly my previous hosting finished a couple of days ago and they deleted my original database and files. I have no idea why it only backed-up three of the attachments - weird.

[sigh] oh well, back to attaching for each link and trying to contact others who uploaded attachments.

Thing that is annoying is that the file name shows it is attached when I edit the link.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 09, 2007 - 3:31 AM:

Well, you make me glad I haven't changed hosts in several years... doesn't sound fun. Even when not changing hosts though, it's a good idea to make a database backup from time to time and archive it on your hard drive.

Thing that is annoying is that the file name shows it is attached when I edit the link.

Not sure what you mean. What file name is shown where? Maybe you still have the old 3.1 era filename and filetitle link fields? They haven't meant anything for years but if you kept them in your templates they'd continue to show the same value they had the last time attachments were done that way. Or do you have custom file fields? Those would also continue to show the nonexistant since they don't query the attachments table.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Dec 09, 2007 - 4:20 AM:

Paul wrote:
Well, you make me glad I haven't changed hosts in several years... doesn't sound fun.


Believe me - it's not <G> Stressful and frustrating! They still haven't found the problem to fix it, but I have at least found out it is something to do with Spam Assassin and ONLY on one of my sites, so I have disabled Spam Assassin and server loads and cpu usage are now great.

One good thing is that they are at the moment upgrading to php5 for me grin

Paul wrote:
Even when not changing hosts though, it's a good idea to make a database backup from time to time and archive it on your hard drive.


Oh I do. But I stupidly deleted the older backups in favour of the last one I did before the previous host deleted my account, so I only had that one, and that is the one that for some reason only has three attachments in it. With all the problems on the server I have to admit I didn't check the site as carefully as I should have before it was too late.

Paul wrote:
Thing that is annoying is that the file name shows it is attached when I edit the link.

Not sure what you mean. What file name is shown where? Maybe you still have the old 3.1 era filename and filetitle link fields? They haven't meant anything for years but if you kept them in your templates they'd continue to show the same value they had the last time attachments were done that way. Or do you have custom file fields? Those would also continue to show the nonexistant since they don't query the attachments table.


I used the new templates (4.1.something) and recustomised those to ensure I hadn't missed anything when updating templates.

Attached are two files: new-1 shows the display with image box, new-2 shows the edit page and that it has an attachment. The following is the code in the edit.tpl for that:
 

<IF {THISMEMBERGROUPCANUPLOAD}>
<tr>
<td class="labelscolumn" width="20%"><span class="labels">Attach Files:</span>
<br >Allowed file types: {ALLOWEDEXTENSIONS}</td>
<td class="optionscolumn" width="80%">
<IF {LINKNUMATTACHMENTS} is less than {THISMEMBERGROUPATTACHPERLINK}><input type="file" name="filefield" > <input type="submit" name="uploadattachment" value="Attach" class="button" ></IF>

<IF {LINKNUMATTACHMENTS}>
<br >Current Attachments:<br >
<!-- BEGIN LINK ATTACHMENTS -->
<input type="checkbox" name="attachdelete[]" value="{ATTACHID}" >
{ATTACHFILETITLE} ({ATTACHKB} KB) ({ATTACHFILENAME})<br >
<!-- END LINK ATTACHMENTS -->
<input type="submit" name="attachdeletion" value="Delete Selected" class="button" >
</IF></td>
</tr>
</IF>




Attached Files:
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 10, 2007 - 6:06 AM:

The list right of attached files in new-2.jpg queries directly from the attachments table, so if a file is listed there it must have an entry in the attachments table.

If you're suggesting the on-disk filename display is a problem, that's something you've customized into it with ({ATTACHFILENAME}), it's not in my template.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Dec 10, 2007 - 6:37 AM:

Paul wrote:
The list right of attached files in new-2.jpg queries directly from the attachments table, so if a file is listed there it must have an entry in the attachments table.

If you're suggesting the on-disk filename display is a problem, that's something you've customized into it with ({ATTACHFILENAME}), it's not in my template.


OK, it's official - I'm an idiot! (feel free to disagree here <G>wink

When I looked at phpmyadmin I looked at the wrong table! I also have wsnforums in that database, and mistakenly looked at that!

So...

In phpmyadmin, is the wsnlinks_attachments table empty?


NO, it states there are 399 attachments. So now the problem is, why don't they show?! I set up a dummy site and imported the original back up into that - and they all show. Unfortunately I really don't want to use that backup as it is now out of date.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#10 - Quote - Permalink
Posted Dec 11, 2007 - 4:58 AM:

www.thedogscene.co.uk/thumb...l.php?attachid=126&debug=1 appears to just hang perpetually with no debug output, which doesn't tell me anything, so I guess it requires inspection: scripts.webmastersite.net/w...dex.php?section=inspection
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.