Moin,
bei der Konvertierung eine Projektes von Version 11 auf 12 bekomme ich einen kilometer langen Fehler. Es geht dabei um die Webseite, die aktuell unter https://community.zeta-producer.com/www.fakt4.de zu finden ist.
Ein anderes Projekt lies sich aber problemlos konvertieren/übernehmen.
Den Fehlercode kann ich auch nicht an den Support senden, dabei steigt das Programm komplett aus.
Jemand ne Idee?
...und die der lange Code. Ich musste aber was abscheiden, wegen des Limits an Zeichen.
Fehler während der Verarbeitung.
Fehler beim Validieren des Projekts.
Skript-Fehler:
---------------
Das Objekt unterstützt diese Eigenschaft oder Methode nicht.: 'image.height'
---------------
Zeile 356, Spalte 4.
---------------
Quelltext:
001: option explicit
002:
003: Dim c__
004: Set c__ = new ScriptExecutor
005: c__.ExecuteScript
006:
007: Class ScriptExecutor
(...Versteckte Zeilen...)
045:
046:
(...Versteckte Zeilen...)
084:
085:
086:
087: public sub ExecuteScript()
088: Context.Write "<!-- zp-deprecated -->" & vbCrLf
089: Context.Write "" & vbCrLf
090: Context.Write ""
091:
092:
093: dim article
094: set article = Context.Scope.CurrentPageItem
095: dim items
096: set items = Context.Scope.CurrentPage.ScriptingGetPageItems( Context.Scope.Library.VersioningVersion )
097:
098: dim hassame
099: hassame = false
100:
101: dim i
102: for i=0 to items.Count-1
103: dim item
104: set item = items(i)
105:
106: if item.IsActive and (item.StyleName = "Bilderalbum" or item.StyleName = "Einzelnes Bild") then
107: if item.ID = article.ID and not hassame then
108:
109:
110: Context.Write "" & vbCrLf
111: Context.Write "" & vbCrLf
112: Context.Write ""
113:
114: if IsNothing(Context.Scope.CurrentTemplate.TemplateProject.TextTemplateManager.GetTextTemplate("ThickboxMod")) then
115:
116: Context.Write "" & vbCrLf
117: Context.Write "<script type=""text/javascript"" src=""../_media/../media/Scripting/ThickBox/thickbox_de.js""></script>" & vbCrLf
118: Context.Write ""
119:
120: else
121:
122: Context.Write "" & vbCrLf
123: Context.Write "<script type=""text/javascript"" src=""../_media/../media/Scripting/ThickBox/thickbox_mod_de.js""></script>" & vbCrLf
124: Context.Write ""
125:
126: end if
127:
128: Context.Write "" & vbCrLf
129: Context.Write "" & vbCrLf
130: Context.Write "<script type=""text/javascript"">" & vbCrLf
131: Context.Write "document.getElementsByTagName(""body"")[0].style.height = ""100%"";" & vbCrLf
132: Context.Write "document.getElementsByTagName(""html"")[0].style.height = ""100%"";" & vbCrLf
133: Context.Write "document.getElementsByTagName(""body"")[0].style.minHeight = ""100%"";" & vbCrLf
134: Context.Write "document.getElementsByTagName(""html"")[0].style.minHeight = ""100%"";" & vbCrLf
135: Context.Write "</script>" & vbCrLf
136: Context.Write ""
137:
138: end if
139: hassame = true
140: end if
141: next
142:
143:
144: Context.Write "" & vbCrLf
145: Context.Write "<a id=""a1063""></a>" & vbCrLf
146: Context.Write ""
147:
148:
149: dim albumID : albumID = Context.Scope.CurrentArticle.Values.GetValue("Album")
150: dim thumbnailWidth : thumbnailWidth = Context.Scope.CurrentArticle.Values.GetValue("Breite der Vorschaubilder")
151: dim thumbnailHeight : thumbnailHeight = CInt((thumbnailWidth*3)/4)
152: dim imagesPerRow : imagesPerRow = Context.Scope.CurrentArticle.Values.GetValue("Anzahl Vorschaubilder pro Zeile")
153: dim assetCategory : set assetCategory = Context.Scope.CurrentWebProject.GetAssetCategoryByID( albumID )
154: dim images : set images = assetCategory.Images
155:
156: dim rowIndex : dim colIndex : dim index
157: dim rowCount : rowCount = images.Count \ imagesPerRow
158: if images.Count mod imagesPerRow > 0 then
159: rowCount = rowCount + 1
160: end if
161:
162: Context.Scope.Library.Log images.Count & " images..."
163: Context.Scope.Library.CheckAsyncStopProcessing
164:
165: ' Must use a prefix to allow multiple instances of the JavaScript on the page.
166: dim prefix
167: prefix = "prefix_1063_"
168:
169:
170: Context.Write "" & vbCrLf
171: Context.Write "<a id="""
172:
173: Context.Write prefix
174:
175: Context.Write "thumbnails""></a>" & vbCrLf
176: Context.Write "<div class=""zpColumnItem"">" & vbCrLf
177: Context.Write "" & vbTab & "<div class=""articlearea""<!--{ZP-INLINE-EDITING-START}" & vbCrLf
178: Context.Write " " & vbCrLf
179: Context.Write " data-type=""inline-editing""" & vbCrLf
180: Context.Write " data-context=""article""" & vbCrLf
181: Context.Write " data-area-name="""
182:
183: Context.Write grid_.AreaName
184:
185: Context.Write """" & vbCrLf
186: Context.Write " data-item-id="""
187:
188: Context.Write pageItem_.ID
189:
190: Context.Write """" & vbCrLf
191: Context.Write " "
192:
193: if pageItem_.IsActive then
194:
195: Context.Write "data-item-state=""active"""
196:
197: else
198:
199: Context.Write "data-item-state=""inactive"""
200:
201: end if
202:
203: Context.Write "" & vbCrLf
204: Context.Write "" & vbCrLf
205: Context.Write "{ZP-INLINE-EDITING-END}-->>" & vbCrLf
206: Context.Write ""
207:
208: if Context.Scope.CurrentArticle.Name <> "" then
209:
210: Context.Write "<h2 style=""text-align:left"">Galerie Clean Kampagne</h2>"
211:
212: end if
213:
214: Context.Write "" & vbCrLf
215: Context.Write "<script type=""text/javascript"">" & vbCrLf
216: Context.Write "var "
217:
218: Context.Write prefix
219:
220: Context.Write "currentIndex = 0;" & vbCrLf
221: Context.Write "" & vbCrLf
222: Context.Write "var "
223:
224: Context.Write prefix
225:
226: Context.Write "g = new Array();" & vbCrLf
227: Context.Write "var "
228:
229: Context.Write prefix
230:
231: Context.Write "t = new Array();" & vbCrLf
232: Context.Write "" & vbCrLf
233: Context.Write ""
234:
235:
236: for index=0 to images.Count-1
237:
238: dim image
239: set image = images.Item(index)
240:
241: Context.Scope.Library.CheckAsyncStopProcessing
242:
243:
244: Context.Write "" & vbCrLf
245: Context.Write " "
246:
247: Context.Write prefix
248:
249: Context.Write "g["
250:
251: Context.Write index
252:
253: Context.Write "] = """
254:
255: Context.Write image.GetVirtualPathRelative("w")
256:
257: Context.Write """; " & vbCrLf
258: Context.Write " "
259:
260: Context.Write prefix
261:
262: Context.Write "t["
263:
264: Context.Write index
265:
266: Context.Write "] = """
267:
268: Context.Write image.Name
269:
270: Context.Write """;" & vbCrLf
271: Context.Write ""
272:
273: next
274:
275: Context.Write "" & vbCrLf
276: Context.Write "" & vbCrLf
277: Context.Write "function "
278:
279: Context.Write prefix
280:
281: Context.Write "setimage( index )" & vbCrLf
282: Context.Write "{" & vbCrLf
283: Context.Write " var img = new Image();" & vbCrLf
284: Context.Write " img.src = "
285:
286: Context.Write prefix
287:
288: Context.Write "g[index];" & vbCrLf
289: Context.Write " window.document.images["""
290:
291: Context.Write prefix
292:
293: Context.Write "pic""].src = img.src;" & vbCrLf
294: Context.Write " document.getElementById("""
295:
296: Context.Write prefix
297:
298: Context.Write "desc"").innerHTML = "
299:
300: Context.Write prefix
301:
302: Context.Write "t[index];" & vbCrLf
303: Context.Write " "
304:
305: Context.Write prefix
306:
307: Context.Write "currentIndex = index;" & vbCrLf
308: Context.Write "}" & vbCrLf
309: Context.Write "</script>" & vbCrLf
310: Context.Write "<table class=""zpSO-PictureGallery"" cellpadding=""0"" cellspacing=""9"" border=""0"" " & vbCrLf
311: Context.Write "" & vbTab & " "
312:
313: if Context.Scope.CurrentArticle.Name<>"" then
314:
315: Context.Write "" & vbCrLf
316: Context.Write "" & vbTab & " summary="""
317:
318: Context.Write Context.Scope.Library.HtmlEncode(Context.Scope.CurrentArticle.Name)
319:
320: Context.Write """" & vbCrLf
321: Context.Write "" & vbTab & " "
322:
323: else
324:
325: Context.Write "" & vbCrLf
326: Context.Write "" & vbTab & " summary=""Image album""" & vbCrLf
327: Context.Write "" & vbTab & " "
328:
329: end if
330:
331: Context.Write "" & vbCrLf
332: Context.Write "" & vbTab & " >" & vbCrLf
333: Context.Write ""
334:
335:
336: ' -- Build the thumbnails grid.
337: index = 0
338: for rowIndex = 0 to rowCount-1
339:
340:
341: Context.Write "" & vbCrLf
342: Context.Write "<tr>" & vbCrLf
343: Context.Write " "
344:
345:
346: for colIndex = 0 to imagesPerRow-1
347:
348:
349: Context.Write "" & vbCrLf
350: Context.Write " "
351:
352:
353: if index<=images.Count-1 then
354: set image = images.Item(index)
355:
356: if image.height > image.width then
357: thumbnailWidth = thumbnailHeight
358: else
359: thumbnailWidth = Context.Scope.CurrentArticle.Values.GetValue("Breite der Vorschaubilder")
360: end if
361:
362: if image.CheckCreateThumbnail( thumbnailWidth ) then
363: Context.Scope.Library.Log "Erstelle Vorschaubild " & image.Name
364: else
365: Context.Scope.Library.CheckAsyncStopProcessing
366: end if
367:
368:
369: Context.Write "" & vbCrLf
370: Context.Write " <td "
371:
372: if Context.Scope.CurrentArticle.Values.GetValue("Bildname anzeigen") = 1 OR Context.Scope.CurrentArticle.Values.GetValue("Bilder nummerieren") = 1 OR Context.Scope.CurrentArticle.Values.GetValue("Bildbeschreibung anzeigen") = 1 then
373:
374: Context.Write "class=""zpSO-PictureGallery-tdx"" style=""text-align:center;vertical-align:bottom"""
375:
376: else
377:
378: Context.Write "class=""zpSO-PictureGallery-td"" style=""text-align:center;vertical-align:middle"""
379:
380: end if
381:
382: Context.Write ">" & vbCrLf
383: Context.Write " " & vbTab & "<a href="""
384:
385: Context.Write image.GetVirtualPathRelative("w")
386:
387: Context.Write """ title="""