Jump to content

Recommended Posts

Hey all,

i do, most probably have a problem with file encoding and / or BOM. 

My <head>  content is getting moved into <body> and i can inspect a couple of &#65279;  ( ZERO WIDTH NO-BREAK SPACE) chars with dev tools.

I checked all template files with phpstorm, they are all in utf-8 w/o BOM.

The current installation is based on a profile i exported from another project where i had not such problems.

However, in the new project i did change the default language to german and installed english as the second language. 

Might there be any conflicts with the language support modules?

Hints, tips or solutions are highly appreciated 🙂

Share this post


Link to post
Share on other sites
22 minutes ago, lecrackffm said:

I checked all template files with phpstorm, they are all in utf-8 w/o BOM.

I remember to had this same issue with PhpStorm. Open templates with Notepad, unwanted char (��) will appear or use SublimeText 3 with encoding UTF-8 without BOM.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

@flydev thanks.

i reopend all files with Sublimetext 3.. found nothing.

Then i  begun to open all files with VSC.. and there i finally found ��������  behind the <html> tag.

I have no clue how they ended up there nor what funky encoding they are, but deleting them finally solved my problem.

  • Like 2

Share this post


Link to post
Share on other sites

Yes, invisible format characters can mess up your website and drive you nuts because you can't trace the cause in a logical way. Coding with the right editor is crucial. For example the bluefish editor does not reveal invisible format characters but notepad++ does !!

Share this post


Link to post
Share on other sites

We had this discussion a few weeks/months back... could be interesting as well:

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
15 hours ago, pwired said:

Yes, invisible format characters can mess up your website and drive you nuts because you can't trace the cause in a logical way. Coding with the right editor is crucial. For example the bluefish editor does not reveal invisible format characters but notepad++ does !!

yep, took me about three hours from tracing to solution..

i thought an IDE like phpstorm would be at least sophisticated enough to inform me about these little suckers.. 🙂

Lesson learned anyways. Nice weekend to everyone!

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Peter Troeger
      Hello 🙂
      I have set up pagination on a mulitlanguage site.
      I've done this before, but this time I have a problem I can't solve.
      Pagination is activated on 'parent-template' and 'child-template' just to be sure 🙂
      This is my code:
      $children = $page->children('limit=1'); foreach($children as $child) { $title = $child->title; echo $title; } echo $children->renderPager(); The navigation is output correctly and the link look correct as well 'parent-page/page2/'.
      But when I click the link, the site seems to redirect back to 'parent-page/
      Any help would be greatly appreciated 🙂
      - Peter
    • By Jens Martsch - dotnetic
      Hi guys I need an estimate for the following task:
      I developed a job candidate application in ProcessWire and need an extension to a Lister Pro Page.
      My customer wants to display a summary table of the filtered data like in the attached screenshot.
      When you filtered the view, that summary should show how many candidates have which status according to the actual filtered view.
      If you change the filter, the summary table has to be updated also.
      Who can accomplish this task and what would it cost?
      I first need an estimate to tell it to my customer. If he says the price is ok I will provide you with FTP Data to a dev server version of  that tool.
      Thank you in advance.

    • By LuisM
      Hi there,
      im a bit lost right now. I added an hook after templates::save which should get the affected template and write its template ID into a JSON.
      The problem is, the event->object gives me an instance of the templates class. How can I narrow this down to the saved Template and get its ID and fieldgroup?
    • By Clément Lambelet
      Hey!
      I've been working on a Processwire installation (3.0.123) for a few days now and I must have made a big mistake this morning because the links in the admin's main menu no longer appear.
      This is not related to the admin theme, because the bug occurs with all themes (Default, Reno, Uikit).
      I tried to reinstall with the dev version (3.0.136), but the problem is still there. I also uninstalled all the modules I had added, without success. There is no error in the js console. 
      I still can access/view/edit the pages  by going through the admin/page list.
      Thanks in advance for your help!


    • By pwFoo
      Hi,
      I try to add page-edit-own and page-delete-own permissions, but it's strange...
      If a add the custom permissions it looks like both are children of page-edit respectively page-delete. I played with added / revoked permissions, but I can't get it work, that a user of a role just can delete own content.
      First the user can't delete any content and now the user can delete own and foreign pages 🤪
      Is there a tutorial to learn more about the PW permissions?
      Or do I have to rename the permissions to page-own-edit and page-own-delete to be independent from page-edit and page-delete?
×
×
  • Create New...