iamntz / carbon-fields-urlpicker Goto Github PK
View Code? Open in Web Editor NEWAdd an URL Picker field to Carbon
Add an URL Picker field to Carbon
I'm having an issue with the URLpicker changing "Open link in a new tab" back to checked after unchecking the box. It initially works, save the page and view the page and it opens in a new tab. However, then I come back later and they've reset themselves to open in a new tab.
I think there needs to be a tagged release?
Problem 1
- The requested package iamntz/carbon-fields-urlpicker could not be found in any version, there may be a typo in the package name.
This package has a file (file.php) which is being autoloaded.
This causes issues with setups that run composer's autoload before WP's actions are booted. Bedrock's an example, as mentioned here, but in my particular case I'm not even using Bedrock.
I just need to run composer's autoload in wp-config.php
in order to use another package there. And I'm getting fatal errors.
I'd sort of solved the problem commenting all the code in file.php
and pasting it in my functions.php
. My site so far seems to be running well.
Is there any hope that will be changed in any future release?
Thank you
Block::make( __( 'About: Year reports' ) )
->add_fields( array(
Field::make( 'complex', 'about_reports', __('Year reports', 'tt' ) )
->add_fields( array(
Field::make( 'image', 'report_image', 'image' )->set_width( 50 ),
...
Field::make( 'urlpicker', 'report_url', 'URL' )->set_help_text( 'help text' ),
))
))
->set_description( __( 'Year reports' ) )
->set_render_callback( function ( $fields, $attributes, $inner_blocks ) {});
causes
"This block has encountered an error and cannot be previewed." in admin page
In the page editor I get this error in javascript console:
Uncaught Error: Could not find the component for type "urlpicker".
When I add a 'urlpicker' field to a container then that container won't load. Data that's already in the database loads fine.
Using Carbonfields 2.1.1, WP 4.9.1.
Doesn't appear to work in CarbonFields 3.0. I've tried with and without Gutenberg enabled.
The javascript error Field urlpicker isn't registered.
is thrown.
Hi, I've got urlpicker in my theme. After updating from v3.0.6 to v3.0.10 it broke.
Looks like the assets/build/ folder is missing.
Am I not using this right?
Will you consider adding a release tag to your current commit?
Hi there,
Firstly, thank you for the plugin! I'm trying to use it with the latest version of Carbon Fields but the link is not saved nor selected after clicking on "Add Link".
Kind regards,
This isn't an issue so much as a feature request. I've got a list of links using the urlpicker field, and it would be great to have the anchor listed on the tab for each link. I know Carbon Fields supports ->set_header_template('<%- name %>') for example, but I haven't been able to get it to work with urlpicker fields. If this is already possible, but I'm just not doing something right, I'd love to know. Love the urlpicker!
Hello,
after installing v3.x-dev version had this error:
Fatal error: Uncaught Error: Call to undefined function add_action() in [...]/vendor/iamntz/carbon-fields-urlpicker/field.php:7 Stack trace: #0 [...]/vendor/composer/autoload_real.php(71): require() #1 [...]/vendor/composer/autoload_real.php(61): composerRequire511ba04db4f2f6968fdac33800344033('c36202a7ae4f6da...', '[...]...') #2 [...]/vendor/autoload.php(7): ComposerAutoloaderInit511ba04db4f2f6968fdac33800344033::getLoader() #3 [...]/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php(143): include_once('...') #4 phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(213) : eval()'d code(45): UpdateHelper\UpdateHelper::check(Object(Composer\Script\Event)) #5 [internal function]: UpdateHelper\ComposerPlugin_composer_tmp0->onAut in [...]/vendor/iamntz/carbon-fields-urlpicker/field.php on line 7
to resole i had to make a workaround wrapping add_action in a if(function_exists('add_action')){ ... } in order to make it work.
Can you verify that?
thanks.
So I'm trying to use this along with Carbon Fields as a library in a plugin. I'm getting errors that Carbon Fields can find the Field typo of urlpicker
. What is odd is that this appears to work in our plugin's local development WordPress instance as well as in a local environment of our test site. However, this error is happening in our Pantheon testing environment and also in PHPUnit tests, and it's a wp_die()
failure being thrown by Carbon Fields. I'm unclear on why this is occurring and why Carbon Fields can't find the library in these cases. I've even gone so far as trying to specifically include the field in a use
statement in our plugin where the fields setup is happening as well as specifically including the package file as a require
statement in our plugin startup and neither of these resolved the issue.
I'm not sure what all information would be helpful, but I'm happy to provide more if you need it.
WP 4.9.8
Carbon Fields 2.2
URLpicker commit 5150de5
Chrome 68.0.3440.106
If I click the Select Link button, but then click Cancel instead of adding a link, a blank text field appears. Repeating this causes additional text fields to appear. These fields appear right beneath the button. Prior to this current commit, this behavior still happened but it happened at the bottom of the browser window.
Hi there,
First of all, I just want to say thanks for this nice addition to CF.
Anyway, I'm just having a little issue when updating a slug, and I thought it would be a nice feature :
When searching for a page/post, it could be nice to associate the field to the post by its ID.
That way, instead of just getting the URL as a plain text at this specific moment, we could retrieve the post URL by its ID.
So if we update a post slugs, we don't break the link.
I made a little graphic example just to show what I have in mind :
What do you think about that?
Regards,
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.