tuxy Posted March 4, 2015 Share Posted March 4, 2015 Hello, This is my first real project for a client, made with PW. I have a (little) issue in the site. In the screenshot below you can see in the footer menu, a little square (right). The menu is a inline UL and generated with this code: <ul class="list-inline text-center extra"> <?php $extra = $pages->get('/extra/'); $children = $extra->children(); foreach($children as $child) { echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; }; ?> </ul> I tested adding links manually, and then the square is removed. <ul class="list-inline text-center extra"> <li><a href="#">menu 1</a> <li><a href="#">menu 2</a> </ul> How can I remove this square, when the menu is generated by PW? For the moment the site is in development, but you can see the square on your mobile phone on: jolisa.market-locator.com Regards, Christophe Link to comment Share on other sites More sharing options...
Jan Romero Posted March 4, 2015 Share Posted March 4, 2015 You have a unicode line separator (U+2028, E2 80 A8) between ?> and </ul>, but your main problem is using Android If you switch your editor to ANSI, it will show up as 
. Obviously, that doesn’t belong there. Just remove it and you’re good 1 Link to comment Share on other sites More sharing options...
tuxy Posted March 6, 2015 Author Share Posted March 6, 2015 Hi Jan Romero, I don't know how can I remove this, i try delete unused characters (spaces ed.) and put the </ul> in a echo, but noting helps. <?php $extra = $pages->get('/extra/'); $children = $extra->children(); echo "<ul class='list-inline text-center extra'>"; foreach($children as $child) { echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; }; echo "</ul>"; The editor I used is Sublime Text. But why is it only when PW the list generated? And not when I add a list manually? I have the same issue in the Top navigation: And yes I have a GOOD Android device Christophe Link to comment Share on other sites More sharing options...
Jan Romero Posted March 6, 2015 Share Posted March 6, 2015 I’m not familiar with Sublime Text, but this seems to be a problem of both your phone and Sublime Text not honoring Unicode guidelines (check this out), albeit in different ways. Sublime Text doesn’t show you the problematic character at all and your mobile browser shows a missing glyph symbol. Try viewing your code sample from the first post on your phone. You’ll see the same rectangle right behind the closing PHP tag ?>. Sublime Text should have a view mode that shows invisible white space characters (like tabs, spaces, and your 2028 separator). If you turn that on, you should be able to delete it easily You have run into the same issue as this guy. That is to say, it’s not ProcessWire inserting the symbol 1 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted March 6, 2015 Share Posted March 6, 2015 Or if you use a Mac use TextWrangler or BBEdit to get rid of those gremlins with the “Zap Gremlins” function. 1 Link to comment Share on other sites More sharing options...
ESRCH Posted March 6, 2015 Share Posted March 6, 2015 Hi, I don't know how to solve this, but when viewing the source on my Android using the "VT View Source" application, it appears as if the extra character is actually after the </ul>, not before. Maybe this helps solving the problem? Link to comment Share on other sites More sharing options...
Martijn Geerts Posted March 6, 2015 Share Posted March 6, 2015 You could also try to copy the contents of the effected file, paste it in a textarea, then trow away the affected file, create one with the same name, select and copy the pasted text from the textarea and paste it back to the newly created file, press save. Link to comment Share on other sites More sharing options...
tuxy Posted March 6, 2015 Author Share Posted March 6, 2015 Hi guys, Thanks for the fast answers. I working on Mac and also have TextWranglers (good tip!) Maybe a tip for some people: type in the url field (Mobile Chrome) before the url 'view-source:' Ex: view-source:http://www.mysite.com I see it now on my Nexus5. But why not a square-symbol when adding a ul-list manually? Grtz, Christophe Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now