-
Notifications
You must be signed in to change notification settings - Fork 30
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
Shortcodes ignored with multiple nested levels #47
Comments
Hi @mitjaprelovsek, thanks for the kind words about my library. I'm happy to help and will investigate the issue. In the meantime, can you share a PHP script to reproduce the problem (paste it here or create a gist)? I understand that the text above works fine, the problem is when you paste it several times in a single document? |
Hi Tomasz,
Thanks very much for your fast response! I am not too familiar with gists
so I am pasting the code below. And yes, the problems start appearing
whenever the overall shortcode text gets too long with too many different
shortcodes. I've encountered this issue in many different variations and
shortcodes.
…---
$handlers->add('la-text', function(ShortcodeInterface $s) {
$var=$s->getParameter('format');
if(isset($var)){
return sprintf("<div class='la-text'><%s>%s</%s></div>",
$s->getParameter('format'),urldecode($s->getContent()),$s->getParameter('format'));
}else{
return sprintf("<div class='la-text'>%s</div>",
urldecode($s->getContent()));
}
});
$handlers->add('la-row', function(ShortcodeInterface $s) {
return sprintf("<div class='la-row'>%s</div>", $s->getContent());
});
$handlers->add('la-button', function(ShortcodeInterface $s) {
global $jsString;
$jsString.='$( "#'.$s->getParameter('id').'" ).button();';
return sprintf("<button id='%s'
onClick='sendCommand(\"%s\")'>%s</button>", $s->getParameter('id'),
$s->getParameter('command'),$s->getParameter('label'));
});
$handlers->add('la-slider', function(ShortcodeInterface $s) {
global $jsString;
$jsString.=buildSliderJS($s->getParameter('id'),$s->getParameter('min'),$s->getParameter('max'),$s->getParameter('prefix'),$s->getParameter('value'));
return sprintf("<div id='%s' class='slider-with-handle'><div
id='%s-handle' class='ui-slider-handle'></div></div>",
$s->getParameter('id'), $s->getParameter('id'));
});
$handlers->add('la-color', function(ShortcodeInterface $s) {
global $jsString;
$jsString.=buildColorJS($s->getParameter('id'));
return sprintf("<div id='%s-red'></div><div id='%s-green'></div><div
id='%s-blue'></div><div id='%s-swatch' class='ui-widget-content
ui-corner-all'></div><div
id='%s-swatch-label'></div>",$s->getParameter('id'),$s->getParameter('id'),$s->getParameter('id'),$s->getParameter('id'),$s->getParameter('id'));
});
$handlers->add('la-padding', function(ShortcodeInterface $s) {
return sprintf("<div style='padding:%s'></div>",
$s->getParameter('height'));
});
$handlers->add('la-column', function(ShortcodeInterface $s) {
return sprintf("<div class='la-column' style='width:%s;'>%s</div>",
$s->getParameter('width'), $s->getContent());
});
$processor = new Processor(new RegularParser(), $handlers);
$output=$processor->process($laUI['source']);
echo "<div class='la-main'>".$output."</div>";
---
$jsString is a string that gets echoed just before the </body> tag and is
in relation to jQuery elements. I am attaching the .php file with these 2
functions (buildSliderJS and buildColorJS) just in case. While I am at it,
I am also attaching index.php file where you'll find the above code
snippets.
I hope the above helps, but please just ask if you need anything else!
Looking forward to your reply,
Thanks!
Mitja
|
@mitjaprelovsek I wrote this script to reproduce the issue, it introduces your shortcode handlers (removed <?php
declare(strict_types=1);
namespace X;
use Thunder\Shortcode\HandlerContainer\HandlerContainer;
use Thunder\Shortcode\Parser\RegularParser;
use Thunder\Shortcode\Processor\Processor;
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
require __DIR__.'/vendor/autoload.php';
$handlers = new HandlerContainer();
$handlers->add('la-text', function(ShortcodeInterface $s) {
$format = $s->getParameter('format');
return $format
? sprintf("<div class='la-text'><%s>%s</%s></div>", $format, urldecode($s->getContent()), $format)
: sprintf("<div class='la-text'>%s</div>", urldecode($s->getContent()));
});
$handlers->add('la-row', function(ShortcodeInterface $s) {
return sprintf("<div class='la-row'>%s</div>", $s->getContent());
});
$handlers->add('la-button', function(ShortcodeInterface $s) {
return sprintf("<button id='%s' onClick='sendCommand(\"%s\")'>%s</button>", $s->getParameter('id'), $s->getParameter('command'), $s->getParameter('label'));
});
$handlers->add('la-padding', function(ShortcodeInterface $s) {
return sprintf("<div style='padding:%s'></div>", $s->getParameter('height'));
});
$handlers->add('la-column', function(ShortcodeInterface $s) {
return sprintf("<div class='la-column' style='width:%s;'>%s</div>", $s->getParameter('width'), $s->getContent());
});
$text = '[la-row][la-column width="100%"][la-text format="h1"]Welcome![/la-text][la-text]This page allows you to send commands to LightAct.[/la-text][/la-column][/la-row]
[la-row]
[la-column width="25%"][la-text format="h4"]Sample heading 3[/la-text][la-text]Sample text[/la-text][/la-column]
[la-column width="25%"][la-text format="h4"]Sample heading 3[/la-text][la-text]Sample text[/la-text][/la-column]
[la-column width="25%"][la-text format="h4"]Sample heading 3[/la-text][la-text]Sample text[/la-text][/la-column]
[la-column width="25%"][la-text format="h4"]Sample heading 3[/la-text][la-text]Sample text[/la-text][/la-column]
[/la-row]
';
$text = implode('', array_pad([], 10, $text));
$processor = new Processor(new RegularParser(), $handlers);
echo "<div class='la-main'>".$processor->process($text)."</div>"; |
Hi,
I ran it but got the same issue. The last few div's are cut off whenever I
increase the number of text repetitions in '*$text = implode('',
array_pad([], 3, $text));*' to 3 or more.
Do you think the problem could be connected to the fact that I am running
this on IIS on Windows 10? I installed your library with Composer.json
though.
I am copying in the phpinfo results in case it is something straightforward.
All best,
Mitja
----
Mitja Prelovsek
*CEO @ *VISIBLE* - Creative Technology Group*
p: +386 30 362 454 <030%20362%20454> | skype: mitja.prelovsek
Go to my LinkedIn <https://www.linkedin.com/in/mitjaprelovsek>
w: visible.si
[image: Inline image 1]
DISCLAIMER: This e-mail may contain confidential, legally privileged or
trade secret information which is protected by law. It is intended only for
the person named above. Any dissemination, distribution, copying,
disclosure or use of this message or its contents unless authorized by us
is prohibited. If you have received this message in error, please notify us
immediately by telephoning +386 1 320 44 72 and return it to us by e-mail.
Thank you. You should understand and accept that, when communicating with
us by e-mail, it is not a totally secure communications medium. Although we
have taken steps to ensure that this e-mail and attachments are free from
any virus, we would advise you to ensure they are indeed virus free. We do
not, to the extent permitted by law, accept any liability (whether in
contract, negligence or otherwise) for any virus infection and/or external
compromise of security and/or breach of confidentiality in relation to
transmissions sent by e-mail. Please note we may use technologies that
allow us to track if the email was opened and/or if the links contained
therein were clicked upon. Should you wish we don't use these technologies
when communicating with you, please notify us immediately.
…On Tue, Aug 22, 2017 at 11:47 AM, Tomasz Kowalczyk ***@***.*** > wrote:
I wrote this script to reproduce the issue, it introduces your shortcode
handlers (removed la-color and la-slider because they were not used) and
then tries to process your text example 10 times. Unfortunately, it works
correctly producing 10 times the same block of text. Can you verify it on
your side?
<?phpdeclare(strict_types=1);namespace X;use Thunder\Shortcode\HandlerContainer\HandlerContainer;use Thunder\Shortcode\Parser\RegularParser;use Thunder\Shortcode\Processor\Processor;use Thunder\Shortcode\Shortcode\ShortcodeInterface;require __DIR__.'/vendor/autoload.php';$handlers = new HandlerContainer();$handlers->add('la-text', function(ShortcodeInterface $s) { $format = $s->getParameter('format'); return $format ? sprintf("<div class='la-text'><%s>%s</%s></div>", $format, urldecode($s->getContent()), $format) : sprintf("<div class='la-text'>%s</div>", urldecode($s->getContent()));});$handlers->add('la-row', function(ShortcodeInterface $s) { return sprintf("<div class='la-row'>%s</div>", $s->getContent());});$handlers->add('la-button', function(ShortcodeInterface $s) { return sprintf("<button id='%s' onClick='sendCommand(\"%s\")'>%s</button>", $s->getParameter('id'), $s->getParameter('command'), $s->getParameter('label'));});$handlers->add('la-padding', function(ShortcodeInterface $s) { return sprintf("<div style='padding:%s'></div>", $s->getParameter('height'));});$handlers->add('la-column', function(ShortcodeInterface $s) { return sprintf("<div class='la-column' style='width:%s;'>%s</div>", $s->getParameter('width'), $s->getContent());});$text = '[la-row][la-column width="100%"][la-text format="h1"]Welcome![/la-text][la-text]This page allows you to send commands to LightAct.[/la-text][/la-column][/la-row][la-row][la-column width="25%"][la-text format="h4"]Sample heading 3[/la-text][la-text]Sample text[/la-text][/la-column][la-column width="25%"][la-text format="h4"]Sample heading 3[/la-text][la-text]Sample text[/la-text][/la-column][la-column width="25%"][la-text format="h4"]Sample heading 3[/la-text][la-text]Sample text[/la-text][/la-column][la-column width="25%"][la-text format="h4"]Sample heading 3[/la-text][la-text]Sample text[/la-text][/la-column][/la-row]';$text = implode('', array_pad([], 10, $text));$processor = new Processor(new RegularParser(), $handlers);echo "<div class='la-main'>".$processor->process($text)."</div>";
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYZ7Bms24BdGi5sN0kwcsz7aO0l7I83Kks5saqPKgaJpZM4O-M6q>
.
|
Can you check if the text is not always cut after a certain length? Maybe something is cutting the resulting HTML code and the browser displays everything it got from your script and fixing the rest. Please put something like |
When I change your code to include this:
$text = implode('', array_pad([], 1, $text));
$text.="EOF";
$processor = new Processor(new RegularParser(), $handlers);
I got the 'EOF' in the browser output.
When I change it to:
$text = implode('', array_pad([], 2, $text));
$text.="EOF";
$processor = new Processor(new RegularParser(), $handlers);
The 'EOF' is already gone. So it seems the problem appears in 2 repetitions
already.
…On Tue, Aug 22, 2017 at 12:12 PM, Tomasz Kowalczyk ***@***.*** > wrote:
Can you check if the text is not always cut after a certain length? Maybe
something is cutting the resulting HTML code and the browser displays
everything it got from your script and fixing the rest. Please put
something like EOF at the end of the input string and check if it is
still there after processing. Windows environment could be an issue, but we
need first to verify if the library output is correct.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYZ7Bjlv7F9Z0Hc8QC0pDgOdIf4UpmQpks5saqmqgaJpZM4O-M6q>
.
|
Also, if it helps, below is the browser output. As you can see the last div
is incorrectly closed.
<div class='la-main'><div class='la-row'><div class='la-column'
style='width:100%;'><div class='la-text'><h1>Welcome!</h1></div><div
class='la-text'>This page allows you to send commands to
LightAct.</div></div></div><div class='la-row'><div class='la-column'
style='width:25%;'><div class='la-text'><h4>Sample heading
3</h4></div><div class='la-text'>Sample text</div></div><div
class='la-column' style='width:25%;'><div class='la-text'><h4>Sample
heading 3</h4></div><div class='la-text'>Sample text</div></div><div
class='la-column' style='width:25%;'><div class='la-text'><h4>Sample
heading 3</h4></div><div class='la-text'>Sample text</div></div><div
class='la-column' style='width:25%;'><div class='la-text'><h4>Sample
heading 3</h4></div><div class='la-text'>Sample
text</div></div></div><div class='la-row'><div class='la-column'
style='width:100%;'><div class='la-text'><h1>Welcome!</h1></div><div
class='la-text'>This page allows you to send commands to
LightAct.</div></div></div><div class='la-row'><div class='la-column'
style='width:25%;'><div class='la-text'><h4>Sample heading
3</h4></div><div class='la-text'>Sample text</div></div><div
class='la-column' style='width:25%;'><div class='la-text'><h4>Sample
heading 3</h4></div><div class='la-text'>Sample text</div></div><div
class='la-column' style='width:25%;'><div class='la-text'><h4>Sample
heading 3</h4></div><div class='la-text'>Sample text</div></div><div
class='la-column' style='width:25%;'><div class=</div>
…On Tue, Aug 22, 2017 at 12:12 PM, Tomasz Kowalczyk ***@***.*** > wrote:
Can you check if the text is not always cut after a certain length? Maybe
something is cutting the resulting HTML code and the browser displays
everything it got from your script and fixing the rest. Please put
something like EOF at the end of the input string and check if it is
still there after processing. Windows environment could be an issue, but we
need first to verify if the library output is correct.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYZ7Bjlv7F9Z0Hc8QC0pDgOdIf4UpmQpks5saqmqgaJpZM4O-M6q>
.
|
Is your text encoded in UTF8? This may be an issue as I'm using a lot of |
i don't know where i can change the encoding to be honest. In the php file
you sent?
I could try to upload the whole thing to a hosted server where they are
running Apache on Linux I presume. But that wouldn't really help me because
I need to make it work on Windows.
|
PHPStorm displays file encoding at the bottom right of the editor, I know that you can change it also in SublimeText or Notepad++. But there may be another solution - could you try running the script (with 10 repetitions or more) I sent you in the console? Is the returned HTML correct there? |
I'll try to do that tomorrow when I'll probably have access to the server
again.
…On Aug 22, 2017 1:41 PM, "Tomasz Kowalczyk" ***@***.***> wrote:
PHPStorm displays file encoding at the bottom right of the editor, I know
that you can change it also in SublimeText or Notepad++. But there may be
another solution - could you try running the script (with 10 repetitions or
more) I sent you in the console? Is the returned HTML correct there?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYZ7Bt4pVqOXDC76X-C5Sg4N9OQVb5mHks5sar56gaJpZM4O-M6q>
.
|
Hi, @mitjaprelovsek have you tried running that script in the console? Also does the Linux environment work correctly? Today I should be able to get a Windows box to test how it works, will tell you if I found any errors. |
Hi, I got my friend working on |
It's Windows 10 and PHP 7.1.7
I'm not in the office today, but I'll try to find a decent enough i-net
connection for remote access either today or tomorrow. The first thing I am
going to try is to change the encoding.
…On Wed, Aug 23, 2017 at 11:30 AM, Tomasz Kowalczyk ***@***.*** > wrote:
Hi, I got my friend working on Windows 10 and PHP 7.1.7 to test the
script I posted above. Unfortunately again, we couldn't reproduce your
issue. Could you please tell me your Windows and PHP version? I don't think
IIS is to be blamed here, I don't see how it could interfere. Do you have
anything other that could help me? Have you also checked your script
encoding? I'm running out of ideas a little, but I hope we'll work out what
the problem is.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYZ7Bm6uMTclXWyMWXS_s5ZVCKk0YSWXks5sa_FSgaJpZM4O-M6q>
.
|
Can you ask your friend to send me a screenshot of his IIS settings perhaps? I am also attaching my phpinfo; |
We didn't do it under IIS, we did it on Windows with latest XAMPP in the console. Did you try it like that? I don't think IIS is interfering with the output since we saw that HTML is cut in the middle but the end is preserved. I suspect there may be issue with the calculation of place where shortcode should be replaced, but I'm unable to reproduce it with virtually any configuration I have tried so far (Windows/Linux, different PHP versions, various encodings, etc.). Could you try to write a failing test case that reproduces your issue on a smaller scale? |
I am looking into using XAMPP instead of IIS at the moment. What do you mean 'on a smaller scale' exactly? With shorter text? |
I mean that you first wrote about discarding "nested" shortcodes, so maybe try to reproduce it by artificially nesting them in various configurations (in my script there were 1-1-2 and 1-4-2, ie. every parent contains at most this number of children). Existing tests (especially ParserTest and ProcessorTest) should give you an idea how to do it. Look at |
Ok, will do that (and probably also change my server to XAMPP instead of IIS). It will have to wait until Monday though when I am back at the main computer. Thanks for all your help so far Tomasz! |
No problem, I'm always happy to help. I'm a little worried though - this library has a quite extensive test suite and you came with something I can't reproduce. :) By the way, did you run PHPUnit on the included tests? Is it all green, all ~280 tests? |
I tried to run processorTest.php, but got 'this page is not working'. How
do I actually run these tests? Are there instructions somewhere?
…On Wed, Aug 23, 2017 at 7:17 PM, Tomasz Kowalczyk ***@***.***> wrote:
No problem, I'm always happy to help. I'm a little worried though - this
library has a quite extensive test suite and you came with something I
can't reproduce. :) By the way, did you run PHPUnit on the included tests?
Is it all green, all ~280 tests?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYZ7BtSO3UwVz99O8yVtXRM3cM4KpwCPks5sbF6hgaJpZM4O-M6q>
.
|
Clone the repository in a separate place (or enter its directory in |
@mitjaprelovsek Hi, any news on your end? |
hi, ill do this on Sunday. thanks.
All the best,
Mitja
m:+386 30 362 454
---
Androids are sloppy typists. Apologies for brevity and typos
…On Aug 25, 2017 10:22, "Tomasz Kowalczyk" ***@***.***> wrote:
@mitjaprelovsek <https://github.com/mitjaprelovsek> Hi, any news on your
end?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYZ7BtasXc8WOmA7QK3xLGosdosehnuJks5sboRdgaJpZM4O-M6q>
.
|
Hello again, I've had the time now to test it on another machine with Wamp server + php 7.0.10 installed. The results are the same, unfortunately. This code:
gives me this output: As you can see, the output is cut. |
Hello again: I've tried to follow your steps in regards to testing php with php unit and on running the And on trying to run ProcessorTest.php in browser I got: The results when running ParserTest.php were more or less the same. It seems there is something wrong with PHPUnit installation. Would you be able to provide any help with this? Thanks a lot! |
ok, I've managed to get PHPUnit working by following this advice and changing the ProcessorTest.php. However, I got 53 errors, most of which are in relation to a 'class not found' Please see below:
First of all, why is there 'Thunder\Shortcode' etc instead of 'Thunderer\Shortcode', which is what I have as folder names? |
Hi, @mitjaprelovsek, I can't tell what is the exact issue here and I'm out of ideas, maybe we could setup a Skype/TeamViewer session to resolve the problem? It's a strange thing that the output from Shortcode is cut at an arbitrary point and nothing seems to suggest a solution. Does this problem always show with longer texts or is it only when shortcodes are nested? Please try running another script and tell me if the output is cut at any point (should display START, then number 1-2000, then STOP): <?php
declare(strict_types=1);
namespace X;
use Thunder\Shortcode\HandlerContainer\HandlerContainer;
use Thunder\Shortcode\Parser\RegularParser;
use Thunder\Shortcode\Processor\Processor;
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
require __DIR__.'/vendor/autoload.php';
$handlers = new HandlerContainer();
$handlers->setDefault(function(ShortcodeInterface $s) {
return '<'.$s->getName().'>';
});
$text = implode('', array_map(function($num) {
return '['.$num.']';
}, range(1, 2000)));
$processor = new Processor(new RegularParser(), $handlers);
echo 'START '.$processor->process($text).' STOP'."\n"; As for your comments, I forgot that things are a little harder on Windows and running PHPUnit may not be as easy. I'd like to help but I haven't really used Windows for years, so maybe just search for a tutorial how to setup it on your machine. The error you receive for |
hi, thanks for all your help so far. i found a different library (bbcode
parser if anyone is having a similar problem than me).
All the best,
Mitja
m:+386 30 362 454
---
Androids are sloppy typists. Apologies for brevity and typos
…On Aug 28, 2017 21:05, "Tomasz Kowalczyk" ***@***.***> wrote:
Hi, @mitjaprelovsek <https://github.com/mitjaprelovsek>, I can't tell
what is the exact issue here and I'm out of ideas, maybe we could setup a
Skype/TeamViewer session to resolve the problem? It's a strange thing that
the output from Shortcode is cut at an arbitrary point and nothing seems to
suggest a solution. Does this problem always show with longer texts or is
it only when shortcodes are nested? Please try running another script and
tell me if the output is cut at any point (should display START, then
number 1-2000, then STOP):
<?phpdeclare(strict_types=1);namespace X;use Thunder\Shortcode\HandlerContainer\HandlerContainer;use Thunder\Shortcode\Parser\RegularParser;use Thunder\Shortcode\Processor\Processor;use Thunder\Shortcode\Shortcode\ShortcodeInterface;require __DIR__.'/vendor/autoload.php';$handlers = new HandlerContainer();$handlers->setDefault(function(ShortcodeInterface $s) { return '<'.$s->getName().'>';});$text = implode('', array_map(function($num) { return '['.$num.']';}, range(1, 2000)));$processor = new Processor(new RegularParser(), $handlers);echo 'START '.$processor->process($text).' STOP'."\n";
As for your comments, I forgot that things are a little harder on Windows
and running PHPUnit may not be as easy. I'd like to help but I haven't
really used Windows for years, so maybe just search for a tutorial how to
setup it on your machine. The error you receive for HandlerContainer not
found means that the autoloader script is missing. Also thunderer is my
nickname, and I use Thunder as a vendor namespace everywhere.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYZ7BgqjmcmoHIxb4s4Xi6ri7UrGHct6ks5scw-RgaJpZM4O-M6q>
.
|
Hi @mitjaprelovsek, I'm sad that you decided to switch libraries, can you help me with this one last time? Can you run the code I pasted in my comment above and/or change |
Hi @thunderer , Sure, happy to. So, when I ran your original suggestion (with regularparser) I got this: When I ran the modified parser where I change both So in the end it looks alright, doesn't it? |
Can you try to use your original text example with |
Also, the XDebug error with |
@mitjaprelovsek Unfortunately, I need to close this issue as not reproducible. I tried virtually any kind of input or configuration to experience your problem on multiple setups I had access to, and every time Shortcode worked as expected. If you can verify the issue using a debugger and point me in any direction where the code is at fault, please open a new issue and I will be happy to take it further from there. |
Hi @mitjaprelovsek, I got other reports of Shortcode issues in Windows environment in #56 and #57 and this time I was able to find the issue - there was an older version of the library installed ( I was able to reproduce your issue while using an older version. Indeed, the text is cut at some point, but that was already fixed and definitely should work on the latest |
Is it too much work to update the readme file with composer 0.6.5 instead of 0.6 for Windows users like us? |
Hi Tomasz,
I'll be honest - that will be really hard. We moved on from this and are
busy with completely different projects nowadays.
Sorry. Thanks for fixing nonetheless.
Mitja
…On Mon, Jan 29, 2018 at 3:58 PM, Tomasz Kowalczyk ***@***.***> wrote:
Hi @mitjaprelovsek <https://github.com/mitjaprelovsek>, I got other
reports of Shortcode issues in Windows environment in #56
<#56> and #57
<#57> and this time I was
able to find the issue - there was an older version of the library
installed (v0.6.0) even though there was a correct version qualifier in
composer.json.
*I was able to reproduce your issue while using an older version.*
Indeed, the text is cut at some point, but that was already fixed and
definitely should work on the latest v0.6.5. I would be very grateful if
you could check it once more and verify that it works for you. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYZ7BhrJRo8rcfi-D0j46WXLdKjd3zK8ks5tPdx8gaJpZM4O-M6q>
.
|
@jenstornell I will do that. The problem is that @mitjaprelovsek I'm only asking for rerunning the test code on the latest Shortcode version and confirming that it works. A simple yes/no answer will suffice, and I'll sleep better if you do this. :) |
@jenstornell I merged all PRs (#60, #61, #62, #63), could you please check that everything works on your side on |
It works on my side, but I have a very simple test and it's for Kirby CMS mainly:
But everything works now. |
May it probably be because the |
@lightact @jenstornell @devnix I just tagged Thanks for using Shortcode! |
Hi,
First, thank you for making this library available. It appears very comprehensive, but I think I've found an issue that I am banging my head against for the past 3 days. In short, I believe that this code starts to omit shortcodes when there are several levels of. Please see my input text with shortcodes below:
[la-row] [la-column width="100%"] [la-text format="h1"]Welcome![/la-text] [la-text]This page allows you to send commands to LightAct. These commands are simple strings that can be read with LightAct Layer Layouts and acted upon. This page uses standard web technologies such as html, Jquery, and AJAX so, if you can use these frameworks, you can write your own page. You can also use our own page builder, which you can access at[/la-text] [/la-column] [/la-row] [la-row] [la-column width="25%"] [la-text format="h4"]Sample heading 3[/la-text] [la-text]Sample text[/la-text] [/la-column] [la-column width="25%"] [la-text format="h4"]Sample heading 3[/la-text] [la-text]Sample text[/la-text] [/la-column] [la-column width="25%"] [la-text format="h4"]Sample heading 3[/la-text] [la-text]Sample text[/la-text] [/la-column] [la-column width="25%"] [la-text format="h4"]Sample heading 3[/la-text] [la-text]Sample text[/la-text] [/la-column] [/la-row]
I've written a php code using your library which transforms the above text into this webpage. Up to here it all works fine.
But if I multiply the above shortcodes 4 times, the last couple of columns start to get omitted as shown here.
Now this is only one manifestation of this issue. From my experience, the more shortcodes there are, especially if they are nested, the sooner this problem appears.
I was wondering if there is anything you can do to help?
The text was updated successfully, but these errors were encountered: