Giter Club home page Giter Club logo

Comments (23)

the-hotmann avatar the-hotmann commented on September 14, 2024 2

Damn what a strange Error... found it!

This Line:

jQuery(window).resize(function() {

Change "jQuery" to "$" as recommended at resize() here:
https://api.jquery.com/resize/

and the Error is gone. Maps works again as expected!!!

Pls fix this.
I tested it in 4 installations and it works properly in all of them, even if they are not configured the same.

Not necessary but recomended:
I would also do the same at L146

Also possible (but would not recommend it)
Use noConflict() at jQuery
Think this is a scope issue.

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024 1

Can someone aprove/disprove this issue???

from go_maps_ext.

mhirdes avatar mhirdes commented on September 14, 2024 1

Recommended solutions of this thread are now integrated, feel free to test and sry for the late response.

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

Justed tried it again in a Installation wich no other Extensions.
What I have enabled: (But also had this in v9.5.5 and worked!)

  compressCss = 1
  concatenateCss = 1
  compressJs = 1
  concatenateJs = 1

The same error:
unexpected end of JS File.

from go_maps_ext.

PascaleBeier avatar PascaleBeier commented on September 14, 2024

Are you using the jquery version bundled with go_maps_ext or another one?

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

I'm not using the jQuery from the Extension.
I use the one whioch comes with the Template (original Query 3.3.1.min.js)

On TYPO3 9.5.5 everything was normal and working, since 9.5.6 the Map is not showing up and a JS Error gets thrown untill you replace jQuery with $.

But the question is: does this Extension work for you on TYPO3 9.5.6? Try to flush all caches and test it in the frontend.

from go_maps_ext.

PascaleBeier avatar PascaleBeier commented on September 14, 2024

Yes, it does work for me.

Try entering jQuery into Browser Console. If this does not return the jQuery function Object, there is something wrong with the jQuery Library integration.

As long as the jQuery Browser Global is available, there are no issues with the JavaScript. Maybe we should add this to the Documentation.

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

Hm I'm using TYPO3 9.5.6 in 4 Installations.
One of them uses Bootstrap Package. (pretty well known Themplate/Extension)
And also there it does not work at TYPO3 9.5.6 (but did (like at the 3 others aswell) at TYPO3 9.5.5.

The solution was to edit it how I said.
The point is that if I do not edit it the gegenration of "ext/go_maps_ext/Resources/Private/Partials/Map/Assign.html" will stuck at:
gme.ll.infoWindowLinkText = "<f:translate key="LLL:EXT:go_maps_ext/Resources/Private/Language/locallang.xlf:tx_gomapsext_partials_map_assign.infoWindowLinkText" />"; L145

Then a JS file gets generated which ends like this:

gme.ll.infoWindowLinkText="Route berechnen (even the closing " is missing)

I checked the File on the Server and it was a File which abrupt stopped after berechnen

from go_maps_ext.

mhirdes avatar mhirdes commented on September 14, 2024

ok. I now check if jQuery || $ is defined. please check.

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

ok. I now check if jQuery || $ is defined. please check.

I updates to the lasted dev-version. But then I still got the same Error:

Unbenannt

Same Error same place in the document is getting force quited

#EDIT: I'm on TYPO3 v9.5.7 now, but this I think will not change anything

from go_maps_ext.

mhirdes avatar mhirdes commented on September 14, 2024

What happens if you remove the line with "Route berechnen" in the Assign.html?

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

Already tried it. Nothing happens.

The .js File which gets generated stucks after this and the error makes it break there.

I also wrote what fixed this issue. Thats the only thing fixing it (yet).
Do you also encounter this problem?
I got this on 4 Installations. One of them is based on bootstrap_package. (version 9.1.2)

from go_maps_ext.

contechno avatar contechno commented on September 14, 2024

I´m having the same issue here using Typo3 9.5.8 and go_maps_ext 3.1.0.

The JS generation stops after the line 145 in go_maps_ext/Resources/Private/Partials/Map/Assign.html:
gme.ll.infoWindowLinkText = "<f:translate key="LLL:EXT:go_maps_ext/Resources/Private/Language/locallang.xlf:tx_gomapsext_partials_map_assign.infoWindowLinkText" />";

So the line 146
var $element = jQuery("#" + gme.mapSettings.id);
seems to throw the error.

Replacing jQuery with $ didn´t work (And "jQuery" returns something when put in the console). Also, I changed the variable name "element", didn´t worked out neither.

Any idea how to fix that? I really like the extension and use it quite often because of it´s great functionality, it´d be a pity if it´s not working anymore

from go_maps_ext.

benjaminmeissner avatar benjaminmeissner commented on September 14, 2024

First of all: Can reproduce this error with own Jquery Version (hat installed latest few weeks back) and same Typo3 Version. Obviously you have to ensure your own Jquery version loads before the scripts included by this Plugin.

Damn what a strange Error... found it!

This Line:

jQuery(window).resize(function() {

Change "jQuery" to "$" as recommended at resize() here:
https://api.jquery.com/resize/

After that I ran into another JS error

VM1253 vhs-assets-jquery-js.js:3818 jQuery.Deferred exception: $element.gomapsext is not a function TypeError: $element.gomapsext is not a function
    at HTMLDocument.<anonymous> (http://my-customer.tld/typo3temp/assets/js/b57b9e9d53.js?1566900130:99:14)
    at mightThrow (http://my-customer.tld/typo3temp/assets/vhs-assets-jquery-js.js?1566900292:3534:29)
    at process (http://my-customer.tld/typo3temp/assets/vhs-assets-jquery-js.js?1566900292:3602:12) undefined

Problem was Located a few lines above

var $element = jQuery("#" + gme.mapSettings.id);

Replaced jQuery with $ here and maps load. This is strangely not working for @contechno . (does the stacktrace stay the same for you after applieng the Fix?)

Unfortunately cant look into this in more depth right now. My Map is loading right now wich was my immediate goal. Maybe i can have a look into it in the future, cant promise though

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

Unfortunately cant look into this in more depth right now. My Map is loading right now wich was my immediate goal.

Happy the fix is working for you.
I think I know what causes the main problem.

I will provide a screenshot soon

The Errorcode is the following:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295: PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/domain.tld/httpdocs/hafen/typo3_src-9.5.9/vendor/typo3fluid/fluid/src/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php line 180 | TYPO3\CMS\Core\Error\Exception thrown in file /var/www/vhosts/domain.tld/httpdocs/hafen/typo3_src-9.5.9/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 124. Requested URL: https://domain.tld/kontakt

go_map_ext error

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

var $element = jQuery("#" + gme.mapSettings.id);

Replaced jQuery with $ here and maps load. This is strangely not working for @contechno . (does the stacktrace stay the same for you after applieng the Fix?)

Thats exactly what I said, but for me it worked (with erros) in life-mode, if I'm in debug-mode it still thow errors.
Thats why I wrote:

Not necessary but recomended:
I would also do the same at L146

Now it is working but the problem is not even the jQuery versiopn or anything else, but the generation of the JS File! Fluid just stuck there and noone knows why.

I personaly made a Version from 3.1.1-dev which got that fix:
go_maps_ext.zip

Just upload it to typo3/typo3conf/ext and overwritethe existing files

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

@mhirdes will this be fixed?
As go_maps_ext is said to be TYPO3 9.5.0-9.5.99 compatible but v3.1.0 (the official one) is not working on any TYPO3 9 Versions

from go_maps_ext.

benjaminmeissner avatar benjaminmeissner commented on September 14, 2024

Happy the fix is working for you.
I think I know what causes the main problem.

I will provide a screenshot soon

The Errorcode is the following:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295: PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/domain.tld/httpdocs/hafen/typo3_src-9.5.9/vendor/typo3fluid/fluid/src/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php line 180 | TYPO3\CMS\Core\Error\Exception thrown in file /var/www/vhosts/domain.tld/httpdocs/hafen/typo3_src-9.5.9/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 124. Requested URL: https://domain.tld/kontakt

Okay. This seems to be a different error than we were talking about (at least i was). We were talking about map Frame Rendering but no map Loading due to an JS Error, didn't we? If not apologies for assuming it.

Also: ist this the Full Stacktrace? Surly a screenshot of a stacktrace can be very big. You alternatively could save the stacktrace as HTML. Replace Your clients name in the whole HTML File and provide the full stacktrace as HTML.

I'm Guessing all of your installations happen to be installed in Composer mode? Your Stacktrace kind of suggests that, at least for this installation. Does this error also appear with a non composer Installation too?

Are all your Installations located on the same Server? If so: does the error persist when copying the installation to a local test enviroment?

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

Yes we are talking about the same issue, the error I posted is the main problem and shows that the JS-Generation stuck because of this error I posted.

Just reproduce the error and check the generated JS File. It just ends where it should not. That is causing the JS Error and the not loaded Map

from go_maps_ext.

NormenKD avatar NormenKD commented on September 14, 2024

Hey, i'm currently dealing with the same issue on a TYPO3 9.5.9 / Apache 2.4.18 / PHP 7.3.9 system.

#1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Invalid argument supplied for foreach() in /home/XXX/typo3/typo3_src-9.5.9/vendor/typo3fluid/fluid/src/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php line 180

I can't really explain the root cause at the moment, but i also found a workaround (and a really weird one, too). Just deleting at least 3 or more leading spaces in a line in the partial "Assign.html" i can get it to work (adding them back and flushing the cache also brings the error back). Specifically here seems to do the trick for me:

$element.trigger('mapresize');

I know this seems really weird, but i thought maybe this could lead to a better understanding of the underlying cause. Might be some kind of string parsing/allocation issue with ViewHelpers, and the "Change jQuery to $" thing from earlier was related to changing the string around that area slightly instead of having something to do with JavaScript syntax. But this is pure conjecture on my part, i currently have no further evidence on this.

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

Yeah this issue is open now for monthes and they dont care about.

But interesting fact, will try it.

from go_maps_ext.

mhirdes avatar mhirdes commented on September 14, 2024

Hi, sry, but we couldn't reproduce the error. If you add a pull request we will integrate your solution.

from go_maps_ext.

the-hotmann avatar the-hotmann commented on September 14, 2024

Its working now.
Also the other multilanguage Bug is gone #55

Maybe releasing the next Version (maybe 3.1.1?) with this fixes would be a good idea.
Also the Version 3.1.0 should be marked as "not working properly" in the TYPO3 Extension-Repo ( https://extensions.typo3.org/extension/go_maps_ext/ )

Gonna test this extension on TYPO3 v10.x soon and report back

from go_maps_ext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.