Webmastersite.net
Register Log In

JavaScript Export error

Comments on JavaScript Export error

babrees
Expert

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

Total Topics: 391
Total Comments: 1303
babrees
Posted May 06, 2009 - 3:45 PM:

I have just been upgrading a site and redoing the templates. I have a toplist for the categories and I always export it for use on non wsn pages. In using what I had previously I found it was throwing errors, so I regenerated the toplist, but it still throws the error.

Toplist...

exportmenu|categories[,]priority;name[,]20[,]ascending[,]parent='0'[,][,][,]0[,]0[,]0[,]0[,]0[,]0[,][,]0


Error...

 

An error occoured at www.idealchristmasgift.co.u...mns[1]=]0[&exporting=1 on 2009-05-06 20:33:21. Please relay this data to support. Error #2: 'mysql_num_rows(): supplied argument is not a valid MySQL result resource' in /home/idealchr/public_html/databases/mysql.php on line 47. Debug info:

Step 1 of backtrace:
File: /home/idealchr/public_html/databases/mysql.php
Line: 47
Function: mysql_num_rows
Arguments:

Step 2 of backtrace:
File: /home/idealchr/public_html/classes/database.php
Line: 153
Function: numrows
Arguments:
Class: db

Step 3 of backtrace:
File: /home/idealchr/public_html/includes/templatefunctions.php
Line: 549
Function: numrows
Arguments:
Class: database

Step 4 of backtrace:
File: /home/idealchr/public_html/end.php
Line: 371
Function: runtoplist
Arguments: categories[,]priority;name[,]20[,]ascending[,]parent='0'[,][,][,]0[,]0[,]0[,]0[,]0[,]0[,][,]0


  • {CATNAME}

    Step 5 of backtrace:
    File: /home/idealchr/public_html/index.php
    Line: 217
    Function: require
    Arguments: /home/idealchr/public_html/end.php

    An error occoured at www.idealchristmasgift.co.u...mns[1]=]0[&exporting=1 on 2009-05-06 20:33:21. Please relay this data to support. Error #2: 'file_put_contents(cache/1-http%3A%2F%2Fwww.idealchristmasgift.co.uk%2Findex.php%3Fcustom%3Dyes%26TID%3Dexportmenu%26usewrapper%3Dno%26type%5B1%5D%3Dcategories%5B%26field%5B1%5D%3D%5Dpriority%3Bname%5B%26number%5B1%5D%3D%5D20%5B%26ascdesc%5B1%5D%3D%5Dascending%5B%26thecondition%5B1%5D%3D%255Dparent%253D%25270%2527%255B%26start%5B1%5D%3D%5D%5B%26columns%5B1%5D%3D%5D0%5B%26exporting%3D1.htm) [function.file-put-contents]: failed to open stream: File name too long' in /home/idealchr/public_html/includes/filefunctions.php on line 544.

    Step 1 of backtrace:
    File: /home/idealchr/public_html/includes/filefunctions.php
    Line: 544
    Function: file_put_contents
    Arguments: cache/1-http%3A%2F%2Fwww.idealchristmasgift.co.uk%2Findex.php%3Fcustom%3Dyes%26TID%3Dexportmenu%26usewrapper%3Dno%26type%5B1%5D%3Dcategories%5B%26field%5B1%5D%3D%5Dpriority%3Bname%5B%26number%5B1%5D%3D%5D20%5B%26ascdesc%5B1%5D%3D%5Dascending%5B%26thecondition%5B1%5D%3D%255Dparent%253D%25270%2527%255B%26start%5B1%5D%3D%5D%5B%26columns%5B1%5D%3D%5D0%5B%26exporting%3D1.htm 1241642001|t|

    Step 2 of backtrace:
    File: /home/idealchr/public_html/includes/cachefunctions.php
    Line: 70
    Function: filewrite
    Arguments: cache/1-http%3A%2F%2Fwww.idealchristmasgift.co.uk%2Findex.php%3Fcustom%3Dyes%26TID%3Dexportmenu%26usewrapper%3Dno%26type%5B1%5D%3Dcategories%5B%26field%5B1%5D%3D%5Dpriority%3Bname%5B%26number%5B1%5D%3D%5D20%5B%26ascdesc%5B1%5D%3D%5Dascending%5B%26thecondition%5B1%5D%3D%255Dparent%253D%25270%2527%255B%26start%5B1%5D%3D%5D%5B%26columns%5B1%5D%3D%5D0%5B%26exporting%3D1.htm 1241642001|t|

    Step 3 of backtrace:
    File: /home/idealchr/public_html/includes/commonfuncs.php
    Line: 1621
    Function: savecache
    Arguments:

    Step 4 of backtrace:
    File: /home/idealchr/public_html/includes/commonfuncs.php
    Line: 1203
    Function: finaloutput
    Arguments:

    Step 5 of backtrace:
    File: /home/idealchr/public_html/end.php
    Line: 452
    Function: OutputPhpDocument
    Arguments:

    Step 6 of backtrace:
    File: /home/idealchr/public_html/index.php
    Line: 217
    Function: require
    Arguments: /home/idealchr/public_html/end.php
    Cannot write to the file cache/1-http%3A%2F%2Fwww.idealchristmasgift.co.uk%2Findex.php%3Fcustom%3Dyes%26TID%3Dexportmenu%26usewrapper%3Dno%26type%5B1%5D%3Dcategories%5B%26field%5B1%5D%3D%5Dpriority%3Bname%5B%26number%5B1%5D%3D%5D20%5B%26ascdesc%5B1%5D%3D%5Dascending%5B%26thecondition%5B1%5D%3D%255Dparent%253D%25270%2527%255B%26start%5B1%5D%3D%5D%5B%26columns%5B1%5D%3D%5D0%5B%26exporting%3D1.htm! You must chmod it to 666.
  • Paul
    developer

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

    Total Topics: 61
    Total Comments: 7868
    Paul
    Posted May 06, 2009 - 7:55 PM:

    I forgot to add handling for the new toplist separator sequence to the javascript export. It'll work if you change every [,] to , and I'll fix it to work with [,] shortly.
    babrees
    Expert

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

    Total Topics: 391
    Total Comments: 1303
    babrees
    Posted May 06, 2009 - 11:47 PM:

    Nope - still doesn't work, although the error messages seem slightly different and they actually show some of the menu items inbetween the errors...

    Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} An error occoured at www.idealchristmasgift.co.u...lumns[1]=0&exporting=1 on 2009-05-07 04:43:10. Please relay this data to support. Error #2: 'file_put_contents(cache/1-http%3A%2F%2Fwww.idealchristmasgi ft.co.uk%2Findex.php%3Fcustom%3Dyes%26TID%3Dexportmenu%26use wrapper%3Dno%26type%5B1%5D%3Dcategories%26field%5B1%5D%3Dpri ority%3Bname%26number%5B1%5D%3D20%26ascdesc%5B1%5D%3Dascendi ng%26thecondition%5B1%5D%3Dparent%253D%25270%2527%26start%5B 1%5D%3D%26columns%5B1%5D%3D0%26exporting%3D1.htm) [function.file-put-contents]: failed to open stream: File name too long' in /home/idealchr/public_html/includes/filefunctions.php on line 544.
    Step 1 of backtrace:
    File: /home/idealchr/public_html/includes/filefunctions.php
    Line: 544
    Function: file_put_contents
    Arguments: cache/1-http%3A%2F%2Fwww.idealchristmasgift.co.uk%2Findex.ph p%3Fcustom%3Dyes%26TID%3Dexportmenu%26usewrapper%3Dno%26type %5B1%5D%3Dcategories%26field%5B1%5D%3Dpriority%3Bname%26numb er%5B1%5D%3D20%26ascdesc%5B1%5D%3Dascending%26thecondition%5 B1%5D%3Dparent%253D%25270%2527%26start%5B1%5D%3D%26columns%5 B1%5D%3D0%26exporting%3D1.htm 1241671390|t|
    Christmas Cards Christmas Gift Ideas Gift Certificates Gift Themes SPECIAL OFFERS Stocking Fillers TOP GIFTS FOR 2008 Christmas Countdown Resources
    Step 2 of backtrace:
    File: /home/idealchr/public_html/includes/cachefunctions.php
    Line: 70
    Function: filewrite
    Arguments: cache/1-http%3A%2F%2Fwww.idealchristmasgift.co.uk%2Findex.ph p%3Fcustom%3Dyes%26TID%3Dexportmenu%26usewrapper%3Dno%26type %5B1%5D%3Dcategories%26field%5B1%5D%3Dpriority%3Bname%26numb er%5B1%5D%3D20%26ascdesc%5B1%5D%3Dascending%26thecondition%5 B1%5D%3Dparent%253D%25270%2527%26start%5B1%5D%3D%26columns%5 B1%5D%3D0%26exporting%3D1.htm 1241671390|t|
    Christmas Cards Christmas Gift Ideas Gift Certificates Gift Themes SPECIAL OFFERS Stocking Fillers TOP GIFTS FOR 2008 Christmas Countdown Resources
    Step 3 of backtrace:
    File: /home/idealchr/public_html/includes/commonfuncs.php
    Line: 1621
    Function: savecache
    Arguments:
    Christmas Cards Christmas Gift Ideas Gift Certificates Gift Themes SPECIAL OFFERS Stocking Fillers TOP GIFTS FOR 2008 Christmas Countdown Resources
    Step 4 of backtrace:
    File: /home/idealchr/public_html/includes/commonfuncs.php
    Line: 1203
    Function: finaloutput
    Arguments:
    Christmas Cards Christmas Gift Ideas Gift Certificates Gift Themes SPECIAL OFFERS Stocking Fillers TOP GIFTS FOR 2008 Christmas Countdown Resources
    Step 5 of backtrace:
    File: /home/idealchr/public_html/end.php
    Line: 452
    Function: OutputPhpDocument
    Arguments:
    Christmas Cards Christmas Gift Ideas Gift Certificates Gift Themes SPECIAL OFFERS Stocking Fillers TOP GIFTS FOR 2008 Christmas Countdown Resources
    Step 6 of backtrace:
    File: /home/idealchr/public_html/index.php
    Line: 217
    Function: require
    Arguments: /home/idealchr/public_html/end.php
    Cannot write to the file cache/1-http%3A%2F%2Fwww.idealchristmasgift.co.uk%2Findex.ph p%3Fcustom%3Dyes%26TID%3Dexportmenu%26usewrapper%3Dno%26type %5B1%5D%3Dcategories%26field%5B1%5D%3Dpriority%3Bname%26numb er%5B1%5D%3D20%26ascdesc%5B1%5D%3Dascending%26thecondition%5 B1%5D%3Dparent%253D%25270%2527%26start%5B1%5D%3D%26columns%5 B1%5D%3D0%26exporting%3D1.htm! You must chmod it to 666.
    Christmas Cards Christmas Gift Ideas Gift Certificates Gift Themes SPECIAL OFFERS Stocking Fillers TOP GIFTS FOR 2008 Christmas Countdown Resources
    Paul
    developer

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

    Total Topics: 61
    Total Comments: 7868
    Paul
    Posted May 08, 2009 - 7:40 PM:

    File name too long

    Okay, I'll exclude javascript exports from the cache system.
    Jenny
    Forum Regular

    Usergroup: Customer
    Joined: May 11, 2003

    Total Topics: 64
    Total Comments: 199
    Jenny
    Posted Oct 29, 2009 - 10:38 AM:

    I had the same issue with the [,], but even after solving that it doesn't wanna work. The .js files are generated fine, even with the custom templates, but when I add the code to any website it's just not displayed. I tried it with exporter.php, which works without a problem, but I figured I'd rather avoid the server load.
    Paul
    developer

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

    Total Topics: 61
    Total Comments: 7868
    Paul
    Posted Oct 29, 2009 - 7:26 PM:

    Please provide a specific example.
    Jenny
    Forum Regular

    Usergroup: Customer
    Joined: May 11, 2003

    Total Topics: 64
    Total Comments: 199
    Jenny
    Posted Oct 30, 2009 - 4:42 AM:

    Mmh, not sure how to show you something that's not there...
    okay, I created a javascript export with these settings:

    export_latest|links,id,10,descending,,,,0,0,0,0,0,0,,0

    the file last10.js is in the folder /javascript and the content looks like it should.

    I'm adding <script language="javascript" src="http://link-lounge.com/thelinks/javascript/last10.js"> </script> to one of my pages, for example here: link-lounge.com/thelinks/in...custom=yes&TID=custom-test
    I can see it in the source code, but the toplist doesn't show up. It's probably something really stupid, but when I try to access the file directly I get a 404 error sad
    Paul
    developer

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

    Total Topics: 61
    Total Comments: 7868
    Paul
    Posted Oct 31, 2009 - 12:20 AM:

    This must be a rewriting issue, since http://link-lounge.com/thelinks/javascript/last10.js is a 404 error but you say the file exists. Changing
    $skip = " attachments fckeditor languages temp jquery integration classes templates includes plugins javascript cgi-bin ";
    to
    $skip = " attachments fckeditor languages temp jquery integration classes templates includes plugins cgi-bin ";
    in includes/commonfuncs.php and then resubmitting the SEO settings page should fit it.
    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.