ho-nl / magento2-ho_templatehints Goto Github PK
View Code? Open in Web Editor NEWH&O Magento 2 Advanced Template Hints module
License: BSD 2-Clause "Simplified" License
H&O Magento 2 Advanced Template Hints module
License: BSD 2-Clause "Simplified" License
At the moment you still have the data-attributes and the css classes for each element, should be removed and moved elsewhere.
After implementing this, it should be possible to implement #22.
Hi am getting the above error.
Also the module installs to app/code/Ho ... it shoudln't - it should stay in vendor/
Run
php magento setup:di:compile
During the step - Interceptors cache generation...
return Error:
Ho\Templatehints\Block\Hints\Init
Incorrect dependency in class Ho\Templatehints\Block\Hints\Init in /Applications/XAMPP/xamppfiles/htdocs/magento2data/vendor/ho-nl/magento2-templatehints/Block/Hints/Init.php
\Magento\Framework\View\Asset\Repository already exists in context object
Total Errors Count: 1
Errors during compilation:
Ho\Templatehints\Block\Hints\Init
Incorrect dependency in class Ho\Templatehints\Block\Hints\Init in /Applications/XAMPP/xamppfiles/htdocs/magento2data/vendor/ho-nl/magento2-templatehints/Block/Hints/Init.php
\Magento\Framework\View\Asset\Repository already exists in context object
Total Errors Count: 1
Errors during compilation:
Ho\Templatehints\Block\Hints\Init
Incorrect dependency in class Ho\Templatehints\Block\Hints\Init in /Applications/XAMPP/xamppfiles/htdocs/magento2data/vendor/ho-nl/magento2-templatehints/Block/Hints/Init.php
\Magento\Framework\View\Asset\Repository already exists in context object
Total Errors Count: 1
Wouldn't it be nice if you could jump to the EXACT line and column in PHPStorm?
I've just installed the extension to composer, I see it in the enabled modules but when I push shift with the console opened nothing happens.
I'm using Magento 2.2.5, is there maybe a bug on this version?
I have a magento 2.2.6 installation.
Shift clicking on a product image opens up the light box view of the product image, not logging any output to the console.
The same seems to be true for buttons having click events.
I get the folowing error after installation via Composer.
Parse error: syntax error, unexpected '?' in /magento/vendor/honl/magento2-templatehints/Plugin/View/LayoutPlugin.php on line 150
I followed the steps in the readme
Just a minor feature request which would make the workflow of frontend developers a bit faster and easier.
I've recently been doing frontend development and Jisse from @yireo recommended this module to me, but every time I want to inspect blocks I have to add the URL parameter to do so, wouldn't it be nicer if there was a setting for enabling/disabling the URL parameter so you can inspect elements right away if the developer wishes to?
I can supply you with the code if this idea sounds good to you!
My php version is:
PHP 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
The error is:
[Tue Nov 21 15:26:21.413890 2017] [:error] [pid 6916] [client 192.168.1.97:40862] PHP Parse error: syntax error, unexpected '?' in .../app/code/Ho/Templatehints/Plugin/View/LayoutPlugin.php on line 150
Magento 2.3.3 supports PHP 7.3. Is it possible to add this version in the composer.json?
https://devdocs.magento.com/guides/v2.3/release-notes/release-notes-2-3-3-open-source.html
We have the following HTML
<!--Authentication Pop-Up-->
</div></header><div x-data="initHeaderNavigation()"
x-init="$watch('activeSubmenuId', value => activateSubmenuMobile(value))"
The module inserts the hint like this
<!--Authentication Pop-Up-->
</div></header><div x-data="initHeaderNavigation()"
x-init="$watch('activeSubmenuId', value = data-ho-hinttype="block" ....
@menu-back.window="back"
class="relative z-50 font-bold bg-gray-200 lg:block lg:z-40"
Reason: We should not parse HTML with regex https://github.com/ho-nl/magento2-Ho_Templatehints/blob/master/Plugin/View/LayoutPlugin.php#L117
Related to Hyvä, because we use Alpine JS there and these notations are common
https://gitlab.hyva.io/hyva-themes/hyva-compat/magento2-ho-templatehints/-/issues/2
Magento 2.4.6 now supports PHP 8.2 so should allow the module to use with PHP 8.2
alias, cache lifetime, cached, not cached.
Please add support for enabling the template hints using a cookie. Compared to the url parameter a cookie is automatically added to every page request.
When debugging Magento I frequently have to debug dynamic pages, that might change when being run a second time. Using a cookie works for a links on the website and no changes to the urls are required.
composer require-commerce --dev honl/magento2-templatehints
~ 7.1
in the composer.json requirements while Magento 2.4.4 requires PHP >= 8.1:Package honl/magento2-templatehints has requirements incompatible with your PHP version, PHP extensions and Composer version:
- honl/magento2-templatehints 0.2.5 requires php ~7.1 which does not match your installed version 8.1.1.
Traverse to the parent so hint($0) always returns the right hint
When running in docker, the project is mapped to different folders.
It woul be nice to be able to define the root magento path.
Example:
In my case, the remote call points to http://localhost:63342/api/file//var/www/html/vendor/magento/module-sales/view/adminhtml/templates/order/view/info.phtml
The correct one would be http://localhost:63342/api/file/src/vendor/magento/module-sales/view/adminhtml/templates/order/view/info.phtml
Note there's no extra /
and the paths are different in the project.
It's impossible to predict, but making it configurable would help.
PS: Congratulations for the amazing work with the module. It helps a lot.
I get
Error: Cannot instantiate abstract class Magento\Framework\Model\ResourceModel\AbstractResource in /var/www/hausfux/m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php
You also need to execute php bin/magento setup:di:compile
Please add support for PHP 7.1 and up.
magento2-Ho_Templatehints/composer.json
Line 15 in d62ba3d
When I inspect for example the compare products block in the sidebar, the KO view model is logged to the console, but I get no information on the underlying PHP block and template that was used, which was the information I was actually after.
I didn't find a way to access that info.
It would be cool if it would be printed or if there where some way to get at the "server side" info for everything.
Thanks!
composer install error with php 8.2
Package honl/magento2-templatehints has requirements incompatible with your PHP version, PHP extensions and Composer version:
- honl/magento2-templatehints 0.3.0 requires php ~7.4||~8.1.0 which does not match your installed version 8.2.2.
Opening in PhpStorm simply doesn't work anymore, regardless the configuration allowing unsigned requests when using docker.
It's just because the FILE is different then the file in my local machine.
For example: http://localhost:63342/api/file//var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml
The correct url would be http://localhost:63342/api/file/src/vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml
Adding some option to map or replace the url properly would be very nice.
Slack chat:
@paales: How about using the
$proceed
closure to generate the view elements content, instead of calling the methods on the elements directly? Just saying, since not calling$proceed
can break other around plugins. (edited)
Please create a new release :-)
Thanks a bunch!
Maybe with shift ctrl click or something like thst
I think in README, we should state which version the module were tested with. But in composer we should allow any PHP version which likely working with instead of fixing specific versions because our module keep out of dated than PHP version update.
For now, please update composer to support any PHP 7.2.x
You can't use the extension on the checkout success page. If you add the parameter ?ath=1 to the checkout then it gets automatically removed in checkout success.
Greetings,
Does this module compatible with the Hyva theme?
Thanks
Itay
adding ?ath=1 to the url does not work on search result page ( I guess on advanced as well but did not try) and the hints are not present with the page loading normally
There is a solution to this?
I'm not sure if it is possible technically but it would be great if we can run this with production mode
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.