Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not clone row, template variable not found or variable contains markup #276

Open
cristianpark opened this issue Jun 11, 2014 · 5 comments

Comments

@cristianpark
Copy link

cristianpark commented Jun 11, 2014

Hi guys, I have this template [1] with two tables, I have no problem with the second table, I have code like this:

$plantilla->cloneRow('numeroCDP', 4);
--Values
$plantilla->setValue('numeroCDP#1', 1);
...
$plantilla->setValue('numeroCDP#4', 4);

For the first table I have the following code (dinamic created values):

$plantilla->cloneRow($campoClonar->getAlias(), $totalFilas);

for($f=1; $f<=$totalRows; $f++){
    foreach($fields as $field){
        $plantilla->setValue($field->getAlias().'#'.$f, utf8_encode(strip_tags('The value')));
     }//End foreach ($fields)
}

And I have this error:
Can not clone row, template variable not found or variable contains markup

Do you know what can be wrong with my code or my template??

Thanks in advance

[1] http:https://www.mediafire.com/view/c6wbpc77uk1obs9/PlantillaElvira.docx


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ivanlanin ivanlanin added this to the 0.12.0 milestone Jun 12, 2014
@ivanlanin
Copy link
Contributor

One of the common source of problem with template is that the variable is separated into multiple run. Please try to "clear all styles" in the variable part of your template that causes the problem. I'll find time (probably tonight) to look at your template xml file.

@ivanlanin
Copy link
Contributor

Can you check the value of $campoClonar->getAlias()? It should be equal to tablaCantidad. I've been able to clone the row with the following code:

$document->cloneRow('tablaCantidad', 2);
$document->setValue('tablaCantidad#1', 'A');
$document->setValue('tablaCantidad#2', 'B');

@ghost ghost modified the milestones: 0.13.0, 0.12.0 Jan 3, 2015
@OAFCROB
Copy link

OAFCROB commented Jun 30, 2015

I've had issues today where Word's spellchecker was causing the tags in the documents.xml to change the tag. The solution I've found for this was ignoring the spell checker by right clicking on the word and "ignore all".

@ghost ghost removed this from the v0.13.0 milestone Jul 30, 2016
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 18, 2022
@Progi1984 Progi1984 removed the Stale label Nov 18, 2022
@yuyi1122
Copy link

I think cloneRow reported an error because the format of the table used in the template creation process was wrong, so that when copying ${data}, the process did not recognize that it was a table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants