Announcement

Collapse
No announcement yet.

Issue with PDF Generation - HTTP ERROR 500

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with PDF Generation - HTTP ERROR 500

    I am experiencing an issue with PDF generation . When attempting to generate a PDF, I encounter the following error:

    "This page isn’t working -my site is currently unable to handle this request. HTTP ERROR 500."

    I noticed that when I add the condition <!-- {{#ifNotEqual state 'Annulée par le DP'}} --> to filter the content, the PDF generation works as expected. However, without this condition, the process fails, resulting in the aforementioned error.

    Any guidance or assistance you could provide to resolve this would be greatly appreciated.
    htmlizerLinkLimit increased

    Thank you for your prompt attention to this matter.

  • #2
    Hi,
    with the given information and my understand, you have missing the closure of ifNotEqual

    {{#ifNotEqual a b}} a is not equal b {{else}} a is equal b {{/ifNotEqual}}

    Comment


    • espotech
      espotech commented
      Editing a comment
      i have <!-- {{/ifNotEqual}} --> in my code

    • espotech
      espotech commented
      Editing a comment
      <div class="generated-state">
      <i>Generated by System XYZ on: {{now}}</i>
      </div>

      <table>
      <thead>
      <tr>
      <th>Project Identifier</th>
      <th>Task Code</th>
      <th>Region</th>
      <th>Area Designation</th>
      <th>Geographic Points</th>
      <th>Total Land Size (Ha)</th>
      <th>Reforestation Target (Ha)</th>
      <th>Land Ownership Type</th>
      <th>Soil Treatment Method</th>
      <th>Plant Varieties</th>
      <th>Growth Density</th>
      <th>Fence Length (m)</th>
      <th>Budget Estimate (DH)</th>
      <th>Current Status</th>
      </tr>
      </thead>
      <tbody>
      <!-- {{#each records}} -->
      <!-- {{#ifNotEqual status 'Canceled'}} -->


      <tr>
      <td>{{this.projectIdentifier}}</td>
      <td>{{this.taskCode}}</td>
      <td>{{this.region}}</td>
      <td>{{this.areaDesignation}}</td>
      <td>{{this.geographicPoints}}</td>
      <td>{{this.totalLandSize}}</td>
      <td>{{this.reforestationTarget}}</td>
      <td>{{this.landOwnershipType}}</td>
      <td>{{this.soilTreatmentMethod}}</td>
      <td class="plant-varieties-info">
      {{#if varietyForGovernment}}
      <i>Government:</i> {{varietyForGovernment}}<br>
      {{/if}}
      {{#if varietyForContractor}}
      <i>Contractor:</i> {{varietyForContractor}}<br>
      {{/if}}
      </td>
      <td>{{this.growthDensity}}</td>
      <td>{{this.fenceLength}}</td>
      <td>{{this.budgetEstimate}}</td>
      <td>{{this.currentStatus}}</td>
      </tr>


      <!-- {{/ifNotEqual}} -->
      <!-- {{/each}} -->
      </tbody>
      </table>

      this code giveme Error 500

  • #3
    this code give me Error 500
    PHP Code:
    <table>
      <
    thead>
        <
    tr>
          <
    th>Project Identifier</th>
          <
    th>Task Code</th>
          <
    th>Region</th>
          <
    th>Area Designation</th>
          <
    th>Geographic Points</th>
          <
    th>Total Land Size (Ha)</th>
          <
    th>Reforestation Target (Ha)</th>
          <
    th>Land Ownership Type</th>
          <
    th>Soil Treatment Method</th>
          <
    th>Plant Varieties</th>
          <
    th>Growth Density</th>
          <
    th>Fence Length (m)</th>
          <
    th>Budget Estimate (DH)</th>
          <
    th>Current Status</th>
        </
    tr>
      </
    thead>
      <
    tbody>
        <!-- {{
    #each records}} -->
        
    <!-- {{#ifNotEqual status 'Canceled'}} -->
        
    <tr>
          <
    td>{{this.projectIdentifier}}</td>
          <
    td>{{this.taskCode}}</td>
          <
    td>{{this.region}}</td>
          <
    td>{{this.areaDesignation}}</td>
          <
    td>{{this.geographicPoints}}</td>
          <
    td>{{this.totalLandSize}}</td>
          <
    td>{{this.reforestationTarget}}</td>
          <
    td>{{this.landOwnershipType}}</td>
          <
    td>{{this.soilTreatmentMethod}}</td>
          <
    td class="plant-varieties-info">
            {{
    #if varietyForGovernment}}
              
    <i>Government:</i> {{varietyForGovernment}}
              <
    br>
            {{/if}}
            {{
    #if varietyForContractor}}
              
    <i>Contractor:</i> {{varietyForContractor}}
              <
    br>
            {{/if}}
          </
    td>
          <
    td>{{this.growthDensity}}</td>
          <
    td>{{this.fenceLength}}</td>
          <
    td>{{this.budgetEstimate}}</td>
          <
    td>{{this.currentStatus}}</td>
        </
    tr>
        <!-- {{/
    ifNotEqual}} -->
        <!-- {{/
    each}} -->
      </
    tbody>
    </
    table>​ 
    and this code code is working Why?
    PHP Code:
    <table>
      <
    thead>
        <
    tr>
          <
    th>Project Identifier</th>
          <
    th>Task Code</th>
          <
    th>Region</th>
          <
    th>Area Designation</th>
          <
    th>Geographic Points</th>
          <
    th>Total Land Size (Ha)</th>
          <
    th>Reforestation Target (Ha)</th>
          <
    th>Land Ownership Type</th>
          <
    th>Soil Treatment Method</th>
          <
    th>Plant Varieties</th>
          <
    th>Growth Density</th>
          <
    th>Fence Length (m)</th>
          <
    th>Budget Estimate (DH)</th>
          <
    th>Current Status</th>
        </
    tr>
      </
    thead>
      <
    tbody>
        <!-- {{
    #each records}} -->
     
    <!-- {{#ifEqual region'ABC'}} -->
        
    <!-- {{#ifNotEqual status 'Canceled'}} -->
        
    <tr>
          <
    td>{{this.projectIdentifier}}</td>
          <
    td>{{this.taskCode}}</td>
          <
    td>{{this.region}}</td>
          <
    td>{{this.areaDesignation}}</td>
          <
    td>{{this.geographicPoints}}</td>
          <
    td>{{this.totalLandSize}}</td>
          <
    td>{{this.reforestationTarget}}</td>
          <
    td>{{this.landOwnershipType}}</td>
          <
    td>{{this.soilTreatmentMethod}}</td>
          <
    td class="plant-varieties-info">
            {{
    #if varietyForGovernment}}
              
    <i>Government:</i> {{varietyForGovernment}}
              <
    br>
            {{/if}}
            {{
    #if varietyForContractor}}
              
    <i>Contractor:</i> {{varietyForContractor}}
              <
    br>
            {{/if}}
          </
    td>
          <
    td>{{this.growthDensity}}</td>
          <
    td>{{this.fenceLength}}</td>
          <
    td>{{this.budgetEstimate}}</td>
          <
    td>{{this.currentStatus}}</td>
        </
    tr>
        <!-- {{/
    ifNotEqual}} -->
       <!-- {{/
    ifEqual}} -->
        <!-- {{/
    each}} -->
      </
    tbody>
    </
    table>​ 

    Comment


    • #4
      anything in error log?

      Comment


      • espotech
        espotech commented
        Editing a comment
        no nothing

    • #5
      Can you try it with something else? For example: ifNotEqual state 'Test', see if that run? I have feeling your E in Annulée character is causing error.

      Comment


      • espotech
        espotech commented
        Editing a comment
        i have just tried this, not working, i think it is a php timeout

      • esforim
        esforim commented
        Editing a comment
        Try the same on the Demo and see if there an code error?

        Then I would suggest changing PHP version, adding and remove extension, do it for a different more simple field such as varchar.
    Working...
    X