Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Suppressing missing image error (or inserting image with id=1?)
I deleted the Carver image and now I’m paying the price!
I have a jmd_dashboard tab with this perma-error appearing:
Notice: unknown_image1harrr in /usr/www/users/vnw2008/vintagenewworld.com/txp/textpattern/publish/taghandlers.php on line 176
OK, well, I added my own debug code to show the image id it’s looking for. Edit: That’s where “1harrr” comes from, lol
Normally I would post this in the jmd_dashboard thread, but I searched the plugin’s code and it does not call any images.
So, since this is a bit urgent, is there a way I can create a new image with id=1? I just want to upload a tiny transparent image, assign it id 1, and make the error to go away.
Other tips on tracing the error would be appreciated. :-)
Last edited by maruchan (2011-03-15 04:46:24)
Offline
Re: Suppressing missing image error (or inserting image with id=1?)
I believe jmd_dashboard uses a form to build the dashboard. That is where the code calling the image would be.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Suppressing missing image error (or inserting image with id=1?)
MattD is correct :)
and the form is called “jmd_dashboard”
Offline
#4 2011-03-15 08:31:45
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Suppressing missing image error (or inserting image with id=1?)
Otherwise, just upload the image through the images tab, and change the id directly in the database.
Offline
Re: Suppressing missing image error (or inserting image with id=1?)
Els wrote:
Otherwise, just upload the image through the images tab, and change the id directly in the database.
This isn’t a good solution for Marc, I think. The ID field in the table txp_image is auto-incrementing and so not amenable to being changed manually. The options for changing it using mySQL are not straightforward and depend on the situation. Marc’s site is already populated with many images and there is a real risk of throwing them all out of sync. It’s the kind of job I always delegate to my DBA spouse.
A better solution might be to restore the txp_image table from a recent backup that predates the deletion of the ‘1.gif’ record’ but the efficacy of that depends on the changes to the table that were made since the backup because they would have to be reconciled. If it were only an image or two, that probably would be OK.
Even better, I think, in Marc’s situation is for him to find the offending piece of code in the plug-in (or wherever) and to investigate amending the reference to ‘1.gif’ to his newly uploaded ‘tiny transparent image’. Surely he could use the truly wonderful smd_where_used plugin to track down the reference to ‘1.gif’.
Last edited by joebaich (2011-03-15 12:03:02)
Offline
Re: Suppressing missing image error (or inserting image with id=1?)
OK, thanks for all the help.
But the error seems to have gone away on its own. :-( Here’s the jmd_dashboard form code — this stumped me because there’s no image call:
<h1 style="text-align:center">
Hey, you haven’t customized jmd_dashboard yet.
<a href="?event=form&step=form_edit&name=jmd_dashboard">
Do it now!
</a>
</h1>
<div style="width: 400px; margin: 0 auto;">
<h1>
<txp:site_name/>: Last modified on <txp:jmd_dashboard_lastmod/>
</h1>
<h2>Recently published articles</h2>
<txp:hide>SVN/4.0.7 - use the awesome containers:
<txp:article_custom break="li" wraptag="ul">
<txp:title/> –
<txp:jmd_dashboard_edit>
edit #<txp:article_id/>
</txp:jmd_dashboard_edit>
</txp:article_custom>
</txp:hide>
<txp:hide>
To add the edit link, drop an edit tag in a form and add the form att:
<txp:article_custom form="my_edit_tag" limit="5"/>
</txp:hide>
<txp:article_custom limit="5"/>
<h2>Recent comments</h2>
<txp:hide>SVN/4.0.7:
<txp:recent_comments break="li" wraptag="ul">
<txp:comment_message/> – <txp:comment_name link="0"/>
(<txp:jmd_dashboard_edit type="comment">edit</txp:jmd_dashboard_edit>)
</txp:recent_comments>
</txp:hide>
<txp:hide>For the edit link, add a form attribute.</txp:hide>
<txp:recent_comments />
</div>
I see no image calls there. I used smd_where_used just in case (thanks Joe) but found no image references (to that image, anyway) in the database.
Thanks for all the help! I’m glad the problem went away, but frustrated that I don’t know the cause. :-/
Offline
Re: Suppressing missing image error (or inserting image with id=1?)
Now I’m confused because on my Textpattern install image id #1 is divider.gif. Also I just installed jmd_dashboard and it doesn’t seem to reference this or any other images in either the plugin code or the default dashboard.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Suppressing missing image error (or inserting image with id=1?)
Ah, I was probably wrong about which image it was then. But it sounds like you understand my confusion. :-)
Offline
#9 2011-03-15 19:10:27
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Suppressing missing image error (or inserting image with id=1?)
joebaich wrote:
This isn’t a good solution for Marc, I think. The ID field in the table txp_image is auto-incrementing and so not amenable to being changed manually.
I’ve more than once changed the image IDs in the db, no problem. And if #1 is missing, there is no objection to using that number again for a new image.
Offline
Re: Suppressing missing image error (or inserting image with id=1?)
Well, I’ll be darn’d. I checked this by doing it in a fresh installation and Els is right.
Last edited by joebaich (2011-03-15 19:47:22)
Offline
Re: Suppressing missing image error (or inserting image with id=1?)
Thanks Els!
Offline
Re: Suppressing missing image error (or inserting image with id=1?)
Epilogue
Have been scorned and berated by DBA spouse for getting the business of auto-incrementing wrong. As she cuffed me around the ears she reminded me that auto-incrementing is done “on-insert” of a new record to a table and the field can be subsequently be amended manually provided the new value doesn’t already exist in the table; it is a unique index. No good protesting that I really knew all that but got confused.
Offline