We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7231
    • 4,205 Posts
    I am using a few customFields in my MG setup and everything was working great, the fields wee added to the db, and the edit fields show up in the manage page. However, when saving the data it does not get recorded to the db. I pretty much copied and edited some existing fields and pieced together some info from other posts, but no luck so far.

    I am guessing that the problem is in the managePictureTpl. Here is the code for the custom fields:
    Author:<br />
    		<input type="text" size="50" name="[+maxigallery.fieldnames.author+]" id="[+maxigallery.fieldnames.author+]" onKeyDown="document.editform.[+maxigallery.fieldnames.modified+].value='yes'" value="[+maxigallery.picture.author:htmlent+]"/>
    		<br />
    Tags (comma seperated):<br />
    		<input type="text" size="50" name="[+maxigallery.fieldnames.tags+]" id="[+maxigallery.fieldnames.tags+]" onKeyDown="document.editform.[+maxigallery.fieldnames.modified+].value='yes'" value="[+maxigallery.picture.tags:htmlent+]"/>
    	<br />
      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

      Something is happening here, but you don&#39;t know what it is.
      Do you, Mr. Jones? - [bob dylan]
      • 7923
      • 4,213 Posts
      You are the second person reporting that problem... and in short period of time.. hmm... maybe I should try it too. smiley

      Please check this if it helps anything for you to debug it.

      The custom fields has worked just fine and I haven’t done any updates to SVN for a long time, so they should work.. You are using the v0.6 test version, right?


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 7231
        • 4,205 Posts
        You are using the v0.6 test version, right?
        Yes, MG 0.6. I did the die($updateQueryString); and looked at the query and all looked correct, the field names and the content of the custom fields was included and are correct.

        UPDATE `mymodx`.modx_maxigallery SET title='this is the title', descr='description here', author='Author Name', tags='1,2,3,4', pos=1, hide='0' WHERE id='2'


        I manually entered the data in the database but it did not show on the manage pictures page.

        Here is the call, nothing fancy:
        [!MaxiGallery? &pics_per_row=`5` &max_thumb_size=`160x200` &max_pic_size=`0` &customFields=`author,tags`!]


        The placeholders for the data I entered manually are outputting the correct data in the galleryPictureTpl. It seems to only be the update issue. [+maxigallery.picture.author+]
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 7231
          • 4,205 Posts
          Fixed and working fine. As is the case 99% of the time it was a phx syntax error on my part (had a . where there should be a : ) so it was working from the first place, but since it was replacing the data with a blank value on subsequent saves it seemed like it was not working.

          Sorry to cause alarm rolleyes
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don&#39;t know what it is.
            Do you, Mr. Jones? - [bob dylan]